Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint

GIF format. PNG can be used to create indexed color images (via the color table mentioned before) or to create 24-bit truecolor images. Because it does not perform compression on the image data, PNG is good for saving large images such as pho- tographs because none of the photographic data is lost saving it in PNG format. But because images like photographs tend to be fairly large, and hence slow to display over the Web, PNG is best used for generating and displaying simpler graphics. JPEG Joint Photographic Experts Group is a popular format for displaying images, es- pecially such large images as photographs. JPEG performs data compression, and although some of the picture quality is lost, the result is usually a good quality photographic image that is much smaller than the uncompressed original image. This has led to JPEG being widely adopted on the Web, where smaller picture sizes can dramatically improve the time it takes to download and display an image. (Displaying a JPEG image also requires decoding the compression, but that is a fairly fast operation on modern computers compared with the time it often takes to download a file.) However, the drawback to JPEG is exactly the same as its advantage: the compression. If you have a JPEG image, and want to do some editing of the digital image, you have to decode the image to perform the edits and then recompress it. But once an image is compressed, some of the original image data is lost. This compression/decompression will cause the loss of image data to be- come more apparent; several cycles of it can result in a noticeably poorer quality image. So it's best to save the original image in a noncompressed format, which