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.
<-- Date Index --> <-- Thread Index --> [Author Index]

GIF vs JPG



Marvin Jones  writes:
>> I agree that JPEG is always preferable to (256 color or less) GIF 
>> for "real world" images.
>
>May I suggest running test instead of just accepting this "common
>knowledge" without question?

You certainly may suggest it.  But it happens I have extensive
experience in the area.  I may sometimes blow some smoke,
but I'll let you know when I do.

> When I first started working on my website I
>tried doing several photos in both GIF and JPG in several degrees of
>compression. It was my experience that the GIF pictures were almost always
>far superior to the JPG images, even at 100% (which I found produced much
>larger images than the comparable GIF). I still often use JPG images on the
>website because at a medium compression they are smaller than GIFs, and
>size equates to speed of download, of course. But whenever picture quality
>is important to me, I still usually go with GIF. (There's also the
>consideration that many, many of your visitors at a website will only have
>256-color monitors, and the inferior dithering capabilities of most
>browsers will make your 24-bit JPGs look like last week's garbage!)

There are several possible reasons why you got better results with GIF
than JPEG:

1. Were the images "natural"?  By this I mean continuous tone
photographic images.  That is the only type of image suitable for
JPEG compression.

2. Were the images already constrained to 256 colors or otherwise
quantized before JPEG compression?  GIF is lossless, but requires
reduction to 256 colors beforehand.  So if you start with a 256-color
image GIF will reproduce it perfectly and JPEG will not.  You will
also not get very good compression ratios with JPEG on such
images.  This would explain why some of your tests produced
larger JPEG files than GIFs.

3. What JPEG software did you use?  As I said before, some of the
JPEG software out there is really bad.  You see, JPEG doesn't
specify how the DCT is to be calculated.  Many people have found
arithmetic tricks that approximate a DCT with much fewer multiply
operations.  Such software runs faster, but produces more loss,
even at the highest quality level.

I would agree that 24-bit images may look pretty bad when dithered
to display on a 256-color system.  Not being in the business of
running a web site I can say "so get a better display system!"
Seriously though, if we're talking about showing color photographs
over which we have labored to produce the best possible image,
we should strongly encourage the audience to view it properly,
and that means with minimal degradation.  I've seen some 
excellent true- to 256-color mapping software and have done 
some myself.  But you can't get away from the fact that most
natural scenes contain at least a few thousand distinct colors
and reproducing it in 256 colors involves serious loss.

Greg Marshall


------------------------------