<div dir="ltr"><br><br><div class="gmail_quote">On Wed, Jun 20, 2012 at 9:53 PM, Shachar Shemesh <span dir="ltr"><<a href="mailto:shachar@shemesh.biz" target="_blank">shachar@shemesh.biz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"><div class="im">
<div dir="ltr">
</div><blockquote type="cite">
</blockquote></div>
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.<br></div></blockquote><div><br>As far as I know, there is no such thing as "lossless JPEG".<br><br>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.<br>
<br>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.<br>
<br></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div bgcolor="#FFFFFF" text="#000000">
<br>
I hope this enhances your understanding, and therefor your ability
to rely on the compression.<span class="HOEnZb"><font color="#888888"><br>
<br>
Shachar
<blockquote type="cite">
</blockquote>
</font></span><br></div></blockquote></div>Udi<br><br></div>