Re: Digikam image re-compression - is it reliable?
On Wed, Jun 20, 2012, Amos Shapira wrote about Re: Digikam image re-compression - is it reliable?: They are in JPG, not RAW. exif is copied over. Minimal compression setting (whatever that means on the camera's user interface). It is possible that the minimal compression option exists not because it is recommended, but because the marketing people demanded it, and you're actually supposed to use the better compressed options named something like fine or normal or something. Just as an example of what you might be wasting, I took a 12 megapixel (3000x4000) family photo, and saw the following sizes: 8.9 MB - lossless compression (PNG) 4.2 MB - JPEG at 100% setting 3.5 MB - JPEG at 99% setting 2.4 MB - JPEG at 95% setting 1.8 MB - JPEG at 90% setting 1.4 MB - JPEG at 85% setting 1.1 MB - JPEG at 80% setting 0.8 MB - JPEG at 75% setting So as you can see, you can indeed significantly reduce your file size by not insisting on minimal compression (if that means lossless compression, or JPEG at 100% or 99% setting) you can achieve a much better compression. I'd go with 95% or even 90% and don't think you'll ever notice a difference (though I don't presume to be an expert on the subject). I wouldn't go down to 75% unless you're really short on space- remember that in 10 years, you'd be laughing at these sizes which you once thought were large ;-) Nadav. -- Nadav Har'El| Wednesday, Jun 20 2012, n...@math.technion.ac.il |- Phone +972-523-790466, ICQ 13349191 |A fine is a tax for doing wrong. A tax is http://nadav.harel.org.il |a fine for doing well. ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
Re: Digikam image re-compression - is it reliable?
(Sorry was meant to reply to the list as well) Thanks Nadav. I'll try the %90 and %95 option. Trouble is that I need to hand the disk-on-key over to the courier in a couple of hours so might just stick to un-recompressed if it still fits. On 20 June 2012 16:37, Nadav Har'El n...@math.technion.ac.il wrote: On Wed, Jun 20, 2012, Amos Shapira wrote about Re: Digikam image re-compression - is it reliable?: They are in JPG, not RAW. exif is copied over. Minimal compression setting (whatever that means on the camera's user interface). It is possible that the minimal compression option exists not because it is recommended, but because the marketing people demanded it, and you're actually supposed to use the better compressed options named something like fine or normal or something. Just as an example of what you might be wasting, I took a 12 megapixel (3000x4000) family photo, and saw the following sizes: 8.9 MB - lossless compression (PNG) 4.2 MB - JPEG at 100% setting 3.5 MB - JPEG at 99% setting 2.4 MB - JPEG at 95% setting 1.8 MB - JPEG at 90% setting 1.4 MB - JPEG at 85% setting 1.1 MB - JPEG at 80% setting 0.8 MB - JPEG at 75% setting So as you can see, you can indeed significantly reduce your file size by not insisting on minimal compression (if that means lossless compression, or JPEG at 100% or 99% setting) you can achieve a much better compression. I'd go with 95% or even 90% and don't think you'll ever notice a difference (though I don't presume to be an expert on the subject). I wouldn't go down to 75% unless you're really short on space- remember that in 10 years, you'd be laughing at these sizes which you once thought were large ;-) Nadav. -- Nadav Har'El| Wednesday, Jun 20 2012, n...@math.technion.ac.il |- Phone +972-523-790466, ICQ 13349191 |A fine is a tax for doing wrong. A tax is http://nadav.harel.org.il |a fine for doing well. -- [image: View my profile on LinkedIn] http://www.linkedin.com/in/gliderflyer -- [image: View my profile on LinkedIn] http://www.linkedin.com/in/gliderflyer ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
Re: Digikam image re-compression - is it reliable?
On 06/20/2012 06:13 AM, Amos Shapira wrote: Hi, I'm preparing a disk-on-key with family photos to send to my mum and noticed something a bit unexpected. Most of the photos were taken with a Canon EOS 300D, maximum resolution and minimum compression. Some were taken with Android phone and iPhone 4. I use Digikam on Debian to manage my photos. The total space of the original images (including movies, which weren't touched) was ~7.6Gb. The total space after re-compression using default parameters (75%, JPEG, no resizing) - 1Gb. Here's a brief, and probably completely incorrect on several counts, explanation of what JPEG compression does (and, for that matter, also the single frame compression element of MPEG, MPEG2, MPEG4, H264 and just about any lossy picture compression). The picture is divided into squares. Each square is processed with an algorithm called Discrete Cosine Transform (or DCT). If you know Fourier transform, this is essentially the same thing, only in 2D. The resulting is a square of the same size, but with each component in it representing some frequency, rather than a single pixel. And here's the thing. Some positions in this square are more important than others. The practical upshot is that getting the value for some of the positions in this square will result in errors in the picture that are more visible to the human eye than others. Coincidentally, some positions in this square also tend to have lower values (formally, the waves these positions represent have a lower energy in the actual picture). The encoding allows the final image format to not contain the full square, but leave out a certain part of it. So, for lossless JPEG, all you do is take those components that have energy, and use those. This still provides a considerable saving on the uncompressed size. You didn't say how much each picture took, but an uncompressed 24bits/pixel 1920x1280 image will take a little over 7MB. Lossless compression should save about half of that. Lossless JPEG can, depending on the actual picture, be about 3MB. Allowing even a small amount of lossiness (say, JPEG 95%) should bring you down to about 2MB, depending on the actual picture. As usual, the law of diminishing returns is in effect. You pay little visual artifacts for the initial reduction of size, and much more later. I hope this enhances your understanding, and therefor your ability to rely on the compression. Shachar -- Shachar Shemesh Lingnu Open Source Consulting Ltd. http://www.lingnu.com ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
Re: Digikam image re-compression - is it reliable?
Thanks. On 21 June 2012 04:53, Shachar Shemesh shac...@shemesh.biz wrote: On 06/20/2012 06:13 AM, Amos Shapira wrote: Hi, I'm preparing a disk-on-key with family photos to send to my mum and noticed something a bit unexpected. Most of the photos were taken with a Canon EOS 300D, maximum resolution and minimum compression. Some were taken with Android phone and iPhone 4. I use Digikam on Debian to manage my photos. The total space of the original images (including movies, which weren't touched) was ~7.6Gb. The total space after re-compression using default parameters (75%, JPEG, no resizing) - 1Gb. Here's a brief, and probably completely incorrect on several counts, explanation of what JPEG compression does (and, for that matter, also the single frame compression element of MPEG, MPEG2, MPEG4, H264 and just about any lossy picture compression). The picture is divided into squares. Each square is processed with an algorithm called Discrete Cosine Transform (or DCT). If you know Fourier transform, this is essentially the same thing, only in 2D. The resulting is a square of the same size, but with each component in it representing some frequency, rather than a single pixel. And here's the thing. Some positions in this square are more important than others. The practical upshot is that getting the value for some of the positions in this square will result in errors in the picture that are more visible to the human eye than others. Coincidentally, some positions in this square also tend to have lower values (formally, the waves these positions represent have a lower energy in the actual picture). The encoding allows the final image format to not contain the full square, but leave out a certain part of it. So, for lossless JPEG, all you do is take those components that have energy, and use those. This still provides a considerable saving on the uncompressed size. You didn't say how much each picture took, but an uncompressed 24bits/pixel 1920x1280 image will take a little over 7MB. Lossless compression should save about half of that. Lossless JPEG can, depending on the actual picture, be about 3MB. Allowing even a small amount of lossiness (say, JPEG 95%) should bring you down to about 2MB, depending on the actual picture. As usual, the law of diminishing returns is in effect. You pay little visual artifacts for the initial reduction of size, and much more later. I hope this enhances your understanding, and therefor your ability to rely on the compression. Shachar -- Shachar Shemesh Lingnu Open Source Consulting Ltd.http://www.lingnu.com -- [image: View my profile on LinkedIn] http://www.linkedin.com/in/gliderflyer ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
Re: Digikam image re-compression - is it reliable?
On Wed, Jun 20, 2012 at 9:53 PM, Shachar Shemesh shac...@shemesh.bizwrote: So, for lossless JPEG, all you do is take those components that have energy, and use those. This still provides a considerable saving on the uncompressed size. You didn't say how much each picture took, but an uncompressed 24bits/pixel 1920x1280 image will take a little over 7MB. Lossless compression should save about half of that. Lossless JPEG can, depending on the actual picture, be about 3MB. Allowing even a small amount of lossiness (say, JPEG 95%) should bring you down to about 2MB, depending on the actual picture. As usual, the law of diminishing returns is in effect. You pay little visual artifacts for the initial reduction of size, and much more later. As far as I know, there is no such thing as lossless JPEG. Due to the DCT (Discrete Cosine Transform) you mentioned above, you cannot take a square of 8x8 pixels and have an accurate DCT calculation. because you always lose precision, either by going to floating point, or by using finite integer numbers. Perhaps you can get into lossless compression if you use so many bits that will make the whole thing pointless because a PNG image would be smaller. Therefore, using JPEG for lossless images is futile. If you want lossless, go the PNG way. If you are willing to pay some image loss (and control how much), JPEG, or other more advanced formats such as JPEG2000 (wavelet based compression), is more suitable. I hope this enhances your understanding, and therefor your ability to rely on the compression. Shachar Udi ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
Digikam image re-compression - is it reliable?
Hi, I'm preparing a disk-on-key with family photos to send to my mum and noticed something a bit unexpected. Most of the photos were taken with a Canon EOS 300D, maximum resolution and minimum compression. Some were taken with Android phone and iPhone 4. I use Digikam on Debian to manage my photos. The total space of the original images (including movies, which weren't touched) was ~7.6Gb. The total space after re-compression using default parameters (75%, JPEG, no resizing) - 1Gb. I think I saw before that simple re-compression saves a lot of disk space, but this is about 90% reduction (take into account that this includes copied untouched .mp4 movie files). From eye-balling the images on the computer screen (24, 1920x1280) they look just fine. They are going to be printed on regular sized photo paper, not made into bus-stop posters or anything. Am I missing something? Should I still send the larger images (I think I can just barely fit them into an old 8Gb disk-on-key) or will the smaller ones do fine? It also makes me wonder about my own photo stash - it takes a few dozens of Gb's now. If I can recompress them without losing noticeable quality (assume I never intend to display/print them larger than an A4 page) then this could save me a huge amount of disk (+backups, handling, easier shipping to relatives on the other side of the world etc). Thanks, --Amos -- [image: View my profile on LinkedIn] http://www.linkedin.com/in/gliderflyer ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
Re: Digikam image re-compression - is it reliable?
You do not say whether the originals are in JPG formst or in RAW format. If the latter, they contain a lot of information that can be safely discarded (it is used for photo-processing which - in re-compressing - you have decided to forgo. If your originals are JPG files, the re-compression is just that. Now, a JPG compression on JPG compression adds more artefacts, depending on what has been photographed. And, you will not be able to enlarge and print anything really huge. C'est touts. M ---MAV m...@bard.org.il On Wed, Jun 20, 2012 at 6:13 AM, Amos Shapira amos.shap...@gmail.comwrote: Hi, I'm preparing a disk-on-key with family photos to send to my mum and noticed something a bit unexpected. Most of the photos were taken with a Canon EOS 300D, maximum resolution and minimum compression. Some were taken with Android phone and iPhone 4. I use Digikam on Debian to manage my photos. The total space of the original images (including movies, which weren't touched) was ~7.6Gb. The total space after re-compression using default parameters (75%, JPEG, no resizing) - 1Gb. I think I saw before that simple re-compression saves a lot of disk space, but this is about 90% reduction (take into account that this includes copied untouched .mp4 movie files). From eye-balling the images on the computer screen (24, 1920x1280) they look just fine. They are going to be printed on regular sized photo paper, not made into bus-stop posters or anything. Am I missing something? Should I still send the larger images (I think I can just barely fit them into an old 8Gb disk-on-key) or will the smaller ones do fine? It also makes me wonder about my own photo stash - it takes a few dozens of Gb's now. If I can recompress them without losing noticeable quality (assume I never intend to display/print them larger than an A4 page) then this could save me a huge amount of disk (+backups, handling, easier shipping to relatives on the other side of the world etc). Thanks, --Amos -- [image: View my profile on LinkedIn] http://www.linkedin.com/in/gliderflyer ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
Re: Digikam image re-compression - is it reliable?
Thanks. They are in JPG, not RAW. exif is copied over. Minimal compression setting (whatever that means on the camera's user interface). My takeaway from your answer is, as usual - it depends. Most of the photos were takens in typical opportunistic catching the kid doing something funny reasonable light situations, were additional artefacts are less likely to happen. I also don't plan to blow them up to huge sizes. For now it sounds like a +1 for re-compression of normal-light photos. Thanks. --Amos On 20 June 2012 13:30, Marc Volovic m...@bard.org.il wrote: You do not say whether the originals are in JPG formst or in RAW format. If the latter, they contain a lot of information that can be safely discarded (it is used for photo-processing which - in re-compressing - you have decided to forgo. If your originals are JPG files, the re-compression is just that. Now, a JPG compression on JPG compression adds more artefacts, depending on what has been photographed. And, you will not be able to enlarge and print anything really huge. C'est touts. M ---MAV m...@bard.org.il On Wed, Jun 20, 2012 at 6:13 AM, Amos Shapira amos.shap...@gmail.comwrote: Hi, I'm preparing a disk-on-key with family photos to send to my mum and noticed something a bit unexpected. Most of the photos were taken with a Canon EOS 300D, maximum resolution and minimum compression. Some were taken with Android phone and iPhone 4. I use Digikam on Debian to manage my photos. The total space of the original images (including movies, which weren't touched) was ~7.6Gb. The total space after re-compression using default parameters (75%, JPEG, no resizing) - 1Gb. I think I saw before that simple re-compression saves a lot of disk space, but this is about 90% reduction (take into account that this includes copied untouched .mp4 movie files). From eye-balling the images on the computer screen (24, 1920x1280) they look just fine. They are going to be printed on regular sized photo paper, not made into bus-stop posters or anything. Am I missing something? Should I still send the larger images (I think I can just barely fit them into an old 8Gb disk-on-key) or will the smaller ones do fine? It also makes me wonder about my own photo stash - it takes a few dozens of Gb's now. If I can recompress them without losing noticeable quality (assume I never intend to display/print them larger than an A4 page) then this could save me a huge amount of disk (+backups, handling, easier shipping to relatives on the other side of the world etc). Thanks, --Amos -- [image: View my profile on LinkedIn] http://www.linkedin.com/in/gliderflyer ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il -- [image: View my profile on LinkedIn] http://www.linkedin.com/in/gliderflyer ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il