Technical data

Preparing Web Graphics 79
.JPG format
The .JPG or JPEG (Joint Photographic Experts Group) file format,
like .GIF, is universally supported in Web browsers. Unlike .GIF, it
encodes 24-bit images and is a lossy format (i.e. it discards some image
information) with variable compression settings. JPG is clearly the
format of choice for full-color photographic images. For “black and
white” (256-level, 8-bit grayscale) photos, it has no particular
advantages over .GIF.
The unique aspect of exporting as a JPG is in fact the slider control you
use to choose one setting from 10 possible levels. At one end of the
scale, the export applies maximum compression and produces an
extremely small (but quite ugly) image. At the other end, there is
effectively no loss of quality, but file sizes are relatively much larger,
although still compact compared to BMPs, for example.
When choosing a quality setting for .JPG export, keep in mind the
number of times you expect to be re-exporting a particular image. A
photograph may look fine in the Export Optimizer the first time you
export it at .JPG level 6, but after several such saves, you’ll really see a
cumulative quality loss.
PNG format
For Web graphics, the newer .PNG (Portable Network Graphics,
pronounced “ping”) format has a number of advantages over .GIFthe
main ones, from an artist’s perspective, being “lossless” 24-bit images
and support for variable transparency. Whereas .GIF supports simple
binary (“on-off”) transparency, .PNG allows up to 254 levels of partial
transparency for normal images.
The image file includes an “alpha channel” that directs pixels in the
foreground image to merge with those in a background image. Most
commonly used with 24-bit images, anti-aliasing creates the illusion of
smooth curves by varying pixel colors-for rounded images that look
good against any background, not just against a white background. It’s
especially useful for the small graphics commonly used on Web pages,
such as bullets and fancy text.
.PNG’s most obvious drawback at the present time is that the major
Web browsers don’t yet provide full .PNG supportbut this will
change, we hope, as more graphic artists become aware of the format’s
advantages.