
When saving raster images for the Web, should you use GIF, PNG or JPEG? By knowing the most appropriate file format to choose, you will be able to save clearer images with lower file sizes.
The main use of GIFs nowadays is to put simple (non-Flash) animations online. The format is limited to a maximum of 256 colors so it is better suited for images with large color blocks and no continuous gradients. It does support transparency, though, so it is also useful for placing simple illustrations, logos, icons, and, sometimes, even text on top of a colored background. It also uses lossless LZW compression to keep the file sizes small without throwing any data away.
The PNG format (pronounced as "ping") was designed to replace GIFs to avoid any licensing issues from the patented LZW compression. Like GIFs, PNGs support transparency, use a similar lossless compression scheme, and are well suited for images with large areas of the same color. But unlike GIFs, PNGs can support up to 16.7 million colors, which allows them to also be used for photographic images. However, because of its compression scheme, the file sizes are much larger. This is where JPEGs come in.
The JPEG format also supports 16.7 million colors. It's compression scheme, however, handles color information differently compared to the schemes used by GIF and PNG, and is best suited for photographs, or images which use continuous tone and gradients. The GIF and PNG formats, however, are better for images with blocks of color and well-defined edges, such as simple illustrations and text. Beware though that JPEG compression is lossy. Based on your settings, it will throw color information away, which may or may not be visible to the eye. Once saved, that's data that you won't be able to get back.
0 comments:
Post a Comment