Mailinglist Archives:
Infrared
Panorama
Photo-3D
Tech-3D
Sell-3D
MF3D
|
|
Notice |
This mailinglist archive is frozen since May 2001, i.e. it will stay online but will not be updated.
|
|
JPEG Compression
John Ohrt writes:
>JPEG can be lossy, but doesn't have to be. Just set the quality to
>100%. Unless you are satisfied with less than 256 colors, JPG is always
>preferrable to .GIF. This also holds for 256 levels in monochrome.
>With quality set to 100%, a 256 color Jpeg will be almost of identical
>size to a 256 color gif of the same image. No surprise here, they use
>the same compression algolrithm, LZW. LZW is proprietary and the
>authour of even freeware, must get licensed by the patent holders!!!!
>
>The best approach is to use .PNG, Portable Net Graphics format. It uses
>not proprietary algolrithms, virtually always outperforms lzw, and can
>handle 48 bit colour in addition to the 24 and 8 of .JPG and the
>256/64/16/4/2 of .GIF
While there IS a lossless form of JPEG it is almost never used, and I
don't think it uses LZW. "Baseline" JPEG is a combination of DCT
(discrete cosine transform) with quantization and Huffman coding.
In most JPEG applications setting quality to the highest level just
means that there is no quantization. Since Huffman coding is loss-
less this leaves only arithmetic errors in the DCT (well, that's
assuming no subsampling of the chrominance which SHOULD be
the case for maximum quality, but I wouldn't trust some software).
Theoretically, these errors should be very small, but I've seen a
lot of variation from one vendor to another.
I agree that JPEG is always preferable to (256 color or less) GIF
for "real world" images. But hasn't GIF been extended to sup-
port 24-bit images? Where can I find out more about PNG?
JPEG really is limited to 8 bits per channel because the output
of the DCT is truncated to 11 bits, which isn't really quite enough
to handle 8-bit input without error.
Greg Marshall
------------------------------
|