Figure 24.3

You can set the GIF colors according to what's needed for your image. For this button (shown in the Save for Web & Devices dialog), I only needed a few shades of pink and gray.

PNG (Portable Network Graphics)

There are two kinds of PNG: 8-bit and 24-bit. The PNG-8 format uses 8-bit color, which means that each image can contain only 256 colors. Like the GIF format, PNG-8 compresses solid areas of color very well while preserving sharp detail, such as that in line art, logos, or illustrations with type. The PNG-8 format uses a lossless compression method, with no data discarded during compression. However, because PNG-8 files are 8-bit color, optimizing an original 24-bit image—which can contain millions of colors—as a PNG-8 will degrade image quality. PNG-8 files use more advanced compression schemes than GIF, and they can be 10%-30% smaller than GIF files of the same image, depending on the image's color patterns.

PNG-24 file format uses 24-bit color and is suitable for continuous-tone images. PNG-24 uses a lossless compression scheme, so that you never lose image data when you save in this format. However, as a result, PNG-24 files can be much larger than JPEG files of the same image. PNG-24 format is recommended only when working with a continuous-tone image that includes multilevel (variable) transparency, such as you would have in an antialiased image on a transparent layer. (Multilevel transparency is supported by the PNG-24 format but not the JPEG format.)

Bottom line: If you would consider GIF for an image, consider PNG-8 as well. It might give you a smaller file, and can do the job well. If you're thinking about JPEG, consider PNG-24 if your picture has multilevel transparency. If it's a straight image, JPEG will probably give you a smaller, more efficient file. Just remember that if you choose PNG, some users with older browsers may not be able to view your images.

Was this article helpful?

0 0

Post a comment