So, what should I use, GIF or JPG?
Both. Each has its uses and advantages. For web authoring, the majority of your images will probably be GIF's. With a GIF you can get right in there and manipulate the image and its colors on a pixel level.
When should I use a JPG?
When your image is a photograph that has many colors, blends and gradients, and when exact color matching isn't critical.
When should I use a BMP?
Never. A bitmap is totally uncompressed... the files sizes are HUGE. (When we speak of "compression", we're not talking about the width and height of an image... we're talking about it's file size.)
Here are two images...
Original Images: | |
merc.bmp (uncompressed) File size: 116 KB |
bee.bmp (uncompressed) File size: 116 KB |
The car is a photographic image and the bee is a drawn image with relatively few colors. Both images start out as 16 million color bitmaps and both are a whopping 116 KB. Each is saved below as a progressively more compressed JPG and a progressively more compressed GIF. (Compressing a GIF is largely a matter of reducing the number of distict colors in the image. For more on this topic look here.) You'll quickly see drastic differences in how, and how efficiently these images compress.
Note that after looking at the exmples below, for most purposes, a photograph can be compressed to level 10 or 20 JPG with no appreciable loss in image quality. A drawn image can be reduced to 256 colors or less GIF, often with little or no loss in image quality. Always keep an eye on your image file sizes and strike a nice balance between file size and quality.
You may also find useful the following articles... GIF or JPG and GIF Compression Explained.
Also notice that in highly compressed JPG images, it's common to have visible "JPG artifacts". These are little speckles around crisply drawn items and odd color squiggles in photographs. These are nearly invisible in lightly compressed JPG's and non-existant in GIF's (unless the image was first highly compressed as a JPG, then later re-saved as a GIF). These artifacts are one very good reason to use GIF compression for drawn images.
|
|
|
|
[an error occurred while processing this directive] |