Re: gif or jpg?

by "Harold A. Driscoll" <harold(at)driscoll.chi.il.us>

 Date:  Wed, 24 Dec 1997 18:16:09 -0600
 To:  kdail(at)carroll.com (Kevin Dail)
 Cc:  hwg-graphics(at)hwg.org, hwg-basics(at)hwg.org
  todo: View Thread, Original
At 03:26 24/12/97 -0500, Kevin Dail wrote:
>I generaly make pict files that I then convert into gifs and jpgs with
>Graphic Converter. If I take the same picture and then convert it into each
>format, the jpg always has a smaller file size than the gif. 

There are four graphics formats commonly supported by Web browsers. Of
these, XBM and GIF are the most commonly supported, JPEG almost as commonly
supported, and PNG increasingly supported, but hardly universal.

As a rule of thumb, PNG is likely the most compact for ~most~  situations.
Each of the other formats has cases where it is best. However, PNG is not
(yet) as universally supported as one might desire.

JPEG (JPG) can be quite compact for data transfer, and particularly huge
for expansion and display. You can tune its compression from lossless to
quite lossy... in some cases a very lossy compression can give almost tiny
files (outside dimension) which are so almost-the-same that you'll hardly
notice. In some other cases, you'll want little or no loss of the finer
detail.

GIF compression can be very compact, particularly for things like simple
drawings or icons. GIF files give a different kind of control of the
compression, essentially it is lossy to the extent that you want to make it
so.

XBM files can be quite attractive for some graphics, but the files can get
quite large. On the other hand, in a lot of cases, where data transfer is
over compressed links (such as V.42 bis or ISDN compression) quite a bit of
hardware compression might be realized. Their other disadvantage is that
the format is largely neglected by non-UNIX tools.

> Which is better when it comes to file sizes and download time? 

The one which works best in your setting. <g>

>The jpg almost always looks better too. Are gifs that much 
> better for specific things?

This is to be expected... that related files of the same application will
work best in a particular format. <g>

Actual (uncompressed) viewing size deserves consideration, almost as much
as does the compressed file size. The viewing application needs the memory
and the processor power sufficient to handle the total of all pictures on
the page. Actually, twice that much might be needed, plus the size of the
browser, operating system, other applications, etc. There is no such thing
as a free lunch.

Pages which have large uncompressed size can be slower to view, even if
they can be viewed at all in some situations.

/Harold
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Harold A. Driscoll                       mailto:harold(at)driscoll.chi.il.us
#include <std/disclaimer>      http://homepage.interaccess.com/~driscoll/

HWG: hwg-graphics mailing list archives, maintained by Webmasters @ IWA