These are GIF
(pronounced jif as in Jiffy Peanut Butter) and JPEG (pronounced Jay-Peg). Both
JPEG and GIF are compressed. That means that information has been organized
inside the file in a special way in order to minimize the file size.
The difference between JPEG and GIF is the way that they compress the data. JPEG
compression is designed to optimize photographs or images with fine gradations
of color. GIF compression is designed to optimize images with large continuous
areas of color, such as illustrations.
The difference
between JPEG and GIF is the way that they compress the data. JPEG compression is
designed to optimize photographs or images with fine gradations of color. GIF
compression is designed to optimize images with large continuous areas of color,
such as illustrations.
Some Examples:
![]() |
![]() |
![]() |
Low Quality
JPEG Image: size 3KB |
Medium
Quality JPEG Image: size 6KB |
High Quality JPEG Image: size 8KB |
Notice the
more you compress a JPEG image, the more artifacts you begin to see. This is
because you are actually loosing information. JPEG compression is therefore
called lossy compression. You may also notice that the color fidelity does
not change. Colors are not lost in JPEG images. When you use JPEG
compression you will trade off between image quality and image file size.
In the example above, the Medium Quality image is acceptable and is 2KB
small than the high quality example. Note: if you had tried to use GIF compression on the rose, the file size would be over 15KB. |
![]() |
![]() |
![]() |
4 Colors
GIF Image: size 0.9KB |
16 colors
GIF Image: size 1.1KB |
256 colors
GIF Image: size 1.4KB |
GIF is a
lossless compression. Data is not lost. However, color fidelity is not
preserved. This is because GIF indexes or limits the total number of colors
to 256 or less. When using GIF compression, you trade off between color
fidelity and image size. In the example above the 16 color image gives
acceptable color fidelity and its file size is almost as small as the 4
color image. Note: that if you tried to use JPEG compression on this image, the file size would have been over 2.3K . |
Myths & Facts About JPEG
With the explosion of scanners, digital cameras and the World Wide Web, the JPEG image format has quickly become the most widely used digital image format. It's also the most misunderstood. Here's a collection of some common misconceptions and facts about JPEG images.
JPEGs lose quality every time they are opened and/or
saved.
False. Simply opening or displaying a JPEG image does not harm the image
in any way. Saving a JPEG repeatedly during the same editing session (without
ever closing the image) will not accumulate a loss in quality. Copying
and renaming a JPEG will not introduce any loss, but some image editors do
recompress JPEGs when the Save As command is used, so in order to avoid more
loss you should duplicate and rename JPEGs in your file manager rather than
going through a photo editing program.
JPEGs lose quality every time they are opened, edited and saved.
True. If a JPEG image is opened, edited, and saved again it results in
additional image degradation. It is very important to minimize the number of
editing sessions between the initial and final version of a JPEG image. If you
must perform editing functions in several sessions or in several different
programs, you should use a image format that is not lossy (TIFF, BMP, PNG) for
the intermediate editing sessions before saving the final version. Repeated
saving within the same editing session does not introduce additional
damage. It is only when the image is closed, re-opened, edited and saved again.
JPEGs lose quality every time they are used in a page layout program.
False. Using a JPEG Image in a page layout program does not edit
the source JPEG image, therefore no quality is lost. However, because each page
layout software uses different types of compression on their native document
files, you may find your layout documents are considerably larger than the sum
of the embedded JPEG files.
If I compress a JPEG at 70%, then later reopen it and compress it at 90%, the
final image will be restored to a quality setting of 90%.
False. The initial save at 70% introduces a permanent loss in
quality that cannot be restored. Saving again at 90% quality only introduces
additional degradation to an image that has already had considerable loss in
quality. If you must decompress and recompress a JPEG image, using the exact
same quality setting each time seems to introduce little or no degradation to
the unedited areas of the image. Because of the way JPEGs are processed,
however, the same setting rule just explained does not apply when cropping
an image. JPEG compression is applied to an image in small blocks, typically 8
or 16 pixel increments. When you crop a JPEG image, the entire image is shifted
so that the blocks are not aligned in the same places.
Choosing the same numeric quality setting for JPEGs saved in one program will
give the exact same results as the same numeric quality setting in another
program.
False. Quality settings are not standardized across graphics software
programs. In other words, a quality setting of 75 in one program may result in a
much poorer image than the same original image saved with a quality setting of
75 in another program. It's also important to verify what your software is
asking for when you set the quality. Some programs have a numeric scale with
quality at the top of the scale so that a rating of 100 is the highest quality
with little compression. Other programs base the scale on compression where a
setting of 100 is the lowest quality and the highest compression. Some software
and digital cameras use terminology like low, medium, and high for the quality
settings. See
screen shots of JPEG save options in various image editing software
programs.
A quality setting of 100 does not degrade an image at all.
False. Saving an image to JPEG format, always introduces some loss
in quality, though a quality setting of 100 will usually not be detectable by
the average naked eye. In addition, using a quality setting of 100 compared to a
quality setting of 90-95 or so will result in a considerably higher file size
relative to the degree of image loss. If your software does not provide a JPEG
preview, try saving several copies of an image at 90, 95, and 100 quality
settings and compare file size with image quality. Chances are, there will be no
distinguishable difference between the 90 and 100 image, but the difference in
k-bytes could be significant. Keep in mind, however, that subtle color shifting
is one effect of JPEG compression—even at high quality settings—so JPEG should
be avoided in situations where precise color matching is important.
With the explosion of scanners, digital cameras and the World Wide Web, the JPEG image format has quickly become the most widely used digital image format. It's also the most misunderstood. Here's a collection of some common misconceptions and facts about JPEG images.
Progressive JPEGs download faster than ordinary JPEGs.
False. Progressive JPEGs display gradually as they download, so they will
appear initially at a very low quality and gradually become clearer until the
image is fully downloaded. On a slow Internet connection, this may give the
illusion of a faster download, but usually a progressive JPEG is larger in file
size and requires more processing power to decode and display. It's important to
note that some software is incapable of displaying progressive JPEGs, most
notably, the free Imaging program bundled with many versions of Windows.
JPEGs require more processing power to display.
True. JPEGs not only need to be downloaded, but decoded as well. If you
were to compare display time for a GIF and a JPEG with the exact same file size,
the GIF would display marginally faster than the JPEG because it uses a
different compression scheme which does not require as much processing power to
decode. This slight delay is barely noticeable, except perhaps on extremely slow
modem connections.
JPEG is an all-purpose format suitable for just about any image.
False. JPEG is best suited for large photographic images where file size
is the most important consideration, such as images that will be posted on the
Web or transmitted via e-mail and FTP. JPEG is not suitable for most
small images under a few hundred pixels in dimension, and it is not suitable for
screen shots, images with text, images with sharp lines and large blocks of
color, and images that will be edited repeatedly.
JPEG is ideal for long-term image archival.
False. JPEG should only be used for archival when disk space is the
primary consideration. Because JPEG images lose quality each time they are
opened, edited and saved, they should be avoided for archival situations
where the images will need to go through further processing steps. Always
keep a lossless master copy of any image you expect to edit again in the future.
JPEG images do not support transparency.
True. You may think you've seen JPEG image with transparency on the Web,
but in fact the image was created with the intended background incorporated into
the JPEG in such a way that it appears seamless when layered on a Web
page with the same background image. This works best when the background is one
with a subtle texture where seams are indistinguishable. However, because JPEGs
are subject to some color shifting, in many cases, the overlay may never appear
totally seamless.
JPEG2000 is on the way and it will solve all the problems with JPEG.
Let's wait and see. JPEG2000 was initially proposed in 1996. We're now in
the second quarter of 2001, and JPEG2000 is still not yet an accepted
international standard. It can take years before image editing software and Web
browsers are able to support a new format and that cannot happen until the
format is finalized and accepted as a standard. For more information on
JPEG2000, see
The JPEG2000 Source.
I can save disk space by converting my GIF images to JPEGs.
False. GIF images have already been reduced to 256 colors or less. JPEG
images are ideal for large photographic images with millions of colors. GIFs are
ideal for images with sharp lines and large areas of a single color. Converting
the typical GIF image to JPEG will result in color shifting, blurring, and loss
in quality, and in most instances the resulting file will be larger. In general,
it is not of any benefit to attempt a GIF to JPEG conversion if the original GIF
image is more than 100 Kbytes.
PNG is a better
choice.
All JPEG images are high resolution, print-quality photos.
False. Print quality is determined by the pixel dimensions of the image.
To print a 4 by 6 inch photo, the image must have at least 480 x 720 pixels for
an average quality print, and 960 x 1440 pixels or more for a medium to high
quality print. Because JPEG is often used for images to be transmitted and
displayed via the Web, these images are typically reduced to screen resolution
and do not contain enough pixel data to get a high-quality print. When saving
JPEG images from your digital camera, you may wish to use your camera's higher
quality compression setting to reduce the damage done by JPEG compression. I'm
referring here to the quality setting of your camera, not resolution
(which effects pixel dimensions). Not all digital cameras offer this option.