Message-Id: <mailto:199607122118.QAA08561@library.wustl.edu> Date: Fri, 12 Jul 1996 14:11:53 -0700 From: "Louis H. Sharpe II" <mailto:lsharpe@PICTUREL.COM> Subject: Re: Lossless JPEG? To: Multiple recipients of list IMAGELIB
At 08:35 AM 7/12/96 -0400, Pamela Mason wrote:>Is it possible to have a lossless JPEG file?
>If so, what would the compression be vs. a typical original with no
compression?The JPEG standard (ISO 10918 and ITU-T Recommendation T.81) incorporates many different types of compression or encoding processes. A thorough discussion may be found in Joan Mitchell's book described in my last posting.
When most people refer to JPEG compression, they actually mean what might more properly be called the baseline sequential process (often "baseline JPEG"), which uses the DCT (discrete cosine transform) and Huffman coding. This is the lossy form which offers such good visual quality at 10:1 to 20:1 compression ratios. It works by applying two separate compression steps:
1. quantization, which more coarsely (lossily) represents the high spatial frequency (fine detail) portions of the image and more accurately represents the middle and lower frequencies which our eyes can better perceive, and
2. entropy encoding, which squeezes redundant information out of the quantized image in a lossless way, much like CCITT Group 4 compression on binary images. An alternative exists to use the somewhat better arithmetic coding approach for this step, but owing to patent issues, it is not part of the widely implemented baseline JPEG approach.
JPEG also offers an entirely separate, optional compression method called the sequential lossless process ("lossless JPEG"). This preserves all the original information in the image at the cost of achieving only an approximate 2:1 compression ratio. This is neither widely implemented, nor widely used, but it does exist.
Given the relentless decline in storage costs, it hardly seems worth the bother over storing the raw, uncompressed data. It does have, however, an advantage over the LZ and LZW approaches (used in Unix compress, pkzip, gzip, the disk doubling products and in TIFF's patented and now discouraged lossless LZW flavor) in that it is an international standard and will more likely be decodable 200 years from now.
The JPEG committee is currently evaluating candidate algorithms to find a replacement lossless algorithm for this poor performer, but the last report I had heard indicated that 20% improvements were at hand--not much to get excited about yet.
There exists public domain Unix source code for the JPEG lossless algorithm, developed by some Cornell graduate students at:
ftp://ftp.cs.cornell.edu/pub/multimed/ljpg.tar.Z
with a readme file at:
ftp://ftp.cs.cornell.edu/pub/multimed/ljpg.README
We have not used it yet and therefore cannot attest to its correctness, but if anyone is interested in further investigations, Picture Elements would be interested in undertaking to port that software to your machine and to applying the algorithm to any evaluation images you might like to try.
Lou
Louis H. Sharpe II mailto:lsharpe@picturel.com Picture Elements, Inc. 303-444-6767 410 22nd Street, Boulder, CO 80302 USA fax 303-415-1392 http://www.picturel.com ftp://ftp.picturel.com/pub/incoming