Digikam image re-compression - is it reliable?
Udi Finkelstein
Linux-IL at udif.com
Thu Jun 21 08:10:24 IDT 2012
On Wed, Jun 20, 2012 at 9:53 PM, Shachar Shemesh <shachar at shemesh.biz>wrote:
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.cs.huji.ac.il/pipermail/linux-il/attachments/20120621/f47a1b1a/attachment.html>
More information about the Linux-il
mailing list