From: rtillery@crash.cts.com (Rick Tillery)
Newsgroups: comp.sys.amiga.graphics
Subject: Re: JPEG compressions
Date: 24 Jan 93 00:41:22 GMT
Organization: CTS Network Services (crash, ctsnet), El Cajon, CA

Per Flodin (pflodin@etek.chalmers.se) wrote:
: I move a lot of 24 plane pictures (raytraced) using floppydisks and am
: therefore very interrested in keeping the files as short as possible.
: I believe that the best compression today is offered by JPEG's but, as
: you all know, the JPEG standard involves removing data on a user-based rate.

This is called LOSSY compression.

: 
: I'd like to keep my pics as intact as possible so I wonder if a rate of
: 100 (the maximum allowable rate) removes any data or if it just compresses?

No, even with a setting of 100, there will be image degradation.  The first
step of JPEG is to do a conversion of color space from RGB (or whatever the
image is in) to YCrCb space.  Then a Discrete Cosine Transform is done on
the data (this is similar to a Fourier Transform).  If the compressor used
floating-point operations for this step, there would not be any loss.
However, for speed, all the compressors (and decompressors on the reverse
end of this process) use integer math.  The inherent round-off loss will
immediately result in some loss of data.  Admittedly this loss will not
result in more than a 1 or 2 value difference (and you most certainly will
NOT be able to see this).

Then, at a setting of 100, the intentional loss would not be added and the
result would be very close to the original upon decompression.

: I think that a JPEG file using compression rate of 100 still would be
: smaller than most other formats, or?

Some, yes.  All, no.

JPEG relies on the smooth qualities of an image, as well as the inherent
noise present in any real-life image to allow its compression to be
virtually invisible.  If however, the image is a stark image with little
or no noise and a limited amount of detail (at a distance detail becomes
not unlike noise), even at a setting of 100, you may not be pleased with
the results.

: 
: Any suggestions welcome!
:

Here are mine:

1) Play with JPEG by compressing and decompressing images at varying levels
   of compression.  If possible, view the resulting images on a 24 bit
   viewing device (if you don't have one now, you might very well have one
   in the future, so it's a good idea to plan for that quality of output)
   and see at what levels you are satisfied.

You'll notice that un-detailed ray-traces and hand-drawn images suffer the
most from JPEG.

2) For those images you find don't satisfy you except at a setting of 100,
   give JPEG up in favor of the following:

Save the image in raw format (for instance using ADPro's Sculpt saver) in
a red, green and blue file.  Create a text file giving (at the least) the
dimensions of the image (that information is not present in the raw files)
and compress them with your favorite archiving utility (LHArc is probably
the best).

I obtained a 900x900 and a 1000x830 image done (in the good old days) with
Sculpt-Animate.  The images would take up 2.4 and 2.5 megs respectively, but
they were each less than 250K in their archives.  JPEG did nasty things to
them except at a setting of 100, and then the size of the files were nearly
600K!

3) Send me a copy of EVERY ONE of your 24 bit images so I can add to my
   collection (and return some to you in trade) :-)

Rick Tillery
 __________________________________________________________________
|                                                                  |
| Rick Tillery ( RTillery@crash.cts.com  RTillery@cup.portal.com ) |
|                     The displaced Razorback!                     |
|      Amiga - The underdog computer with a superhero's power.     |
| N.I.N.J.A.J.I.S. - "I refuse to donate an aloft fornication."-RT |
|__________________________________________________________________|