--- Hugo_G�vert <[EMAIL PROTECTED]> wrote: > Facts are as I know them to be: > - Jpeg is a lossy compression. That means you will lose some > information > when saving with Jpeg compression Jpeg as well as Jpeg2000 allows lossless compression. Of course in that case the compression ratio cannot be set as it depends on the image. Also the compressed file size will be much bigger even compared to the best quality lossy compression. > - When you open a jpeg file to Photoshop (for instance), <snip> > when you save > it, > you will loose some of the information again. But read on... Not necessarily. For instance the lossy jpeg does a DCT on 8x8 blocks. The DCT and IDCT will give exactly the same results except for possible rounding errors. The Huffman coding will give exactly the same results after decoding the data stream. Big savings come from the quantization of the DCT output. For instance if you have the output values 250, 320, 160, ... you would devide them by the values in the quantization table, for example 80, 70, 70. So you get the integer result 3, 5, 2. Now if you do the inverse you get 3*80=240, 5*70=350, 2*70=140. Now if you compress the image again you will get again (and exactly) 240/80=3, 350/7=5, 140/70=2. So from now it it will stay the same no matter how many times you compress and decompress (assuming no rounding errors). > Every time I opened the new image, I substracted the > pixels > from the image before that to see how many pixels had changed. Quite > surprisingly the change converged very fast (I don't remember how > fast, and it might depend on the image as well as the compression > rate) > to an image that did not change anymore. The reason why you see errors is due to rounding errors in all different stages, i.e. DCT, quantization, down-sampling, RGB-YCbCr conversion, etc. After some time you will get the same result. I could imagine though that in some cases (some coding blocks) it could oscilate, though. Haven't gone through that mathematically to prove it otherwise. > I > think that the larger problem is the initial compression ratio. Me? Definitely. That's why I usualy store all my files in TIFF or psd. As mentioned in my previous email, while you are working on an image you should NOT store it in jpeg because in that case you will lose quality in each step (because you make changes to the file). Robert __________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/ * **** ******* *********************************************************** * For list instructions, including unsubscribe, see: * http://www.a1.nl/phomepag/markerink/eos_list.htm ***********************************************************
