|
From: | pinmacs |
Subject: | Re: yank-media: allow users to limit image types that can be inserted |
Date: | Thu, 31 Oct 2024 12:51:04 +0100 |
On 2024-10-31 12:16, Eli Zaretskii wrote:
Date: Thu, 31 Oct 2024 11:47:42 +0100 From: pinmacs <pinmacs@cas.cat> Maybe I am missing too but when you choose a format, you choose how you store and retain that information. Depending on what you are going to do with that images, you might be interested in different formats.That is inaccurate: the format in which the yanked data is store in Emacs does NOT depend on your selection. Your selection only determines how Emacs will fetch the data from the clipboard/selection, and therefore also how it will interpret that data for the purpose of inserting it into a buffer.
Hi Eli, Let me provide more detail.For the way I use it through orgmode the selection determines how the file is stored.
If I do 2 screen captures of nature [0], and I save one of them with png and jpeg, this is what appears in my orgmode buffer:
file:/path/to/emacs-orgmode-images/2024/2024-10-31_12-36-45_screenshot.png file:/path/to/emacs-orgmode-images/2024/2024-10-31_12-36-59_screenshot.jpegHence, new files where saved. And that has an impact in file size, so in [1] png takes 8 times more, because jpeg is able to compress better a natural image [2].
So me as user in two different use cases of yank-media:- So, me in a day where I am working in IT stuff related, I might want to just select preferred format as png if what I capture is more synthetic, such as text, log errors, visual annotations on user interfaces. - And me, in a day where I am planning a hiking, I might want to select jpeg as preferred format, if I am planning to go to nature, and I am looking on images of nature... because maybe I don't want to save full images, but take pieces of it
Let me know if you want the exact results attached in the mailing list, or you are able to reproduce yourself.
Cheers, pinmacs[0] https://en.wikipedia.org/wiki/Nature_photography#/media/File:Altja_j%C3%B5gi_Lahemaal.jpg
[1][2024-10-31 Thu 12:37:08] $ du -sh /path/to/emacs-orgmode-images/2024/2024-10-31_12-36-45_screenshot.png 805K /path/to/emacs-orgmode-images/2024/2024-10-31_12-36-45_screenshot.png [2024-10-31 Thu 12:37:09] $ du -sh /path/to/org-extra/emacs-orgmode-images/2024/2024-10-31_12-36-59_screenshot.jpeg 101K /path/to/emacs-orgmode-images/2024/2024-10-31_12-36-59_screenshot.jpeg
[2] here is why https://www.techsmith.com/blog/jpg-vs-png/
[Prev in Thread] | Current Thread | [Next in Thread] |