
GIF Format
GIF is an abbreviation for Graphics Interchange Format. It is a compressed or lossless format that compresses the image at a ratio between 3:1 and 5:1. GIF files support maximum of 259 color (8-bit color), which makes them practical for almost all graphics except photographs.
It uses the LZW (Lempel-Ziv-Welch) compression scheme internally to make images as small as possible without degrading the visual quality. GIFs have a file extension of ‘.GIF’.
The advantages of GIF format –
- It supports transparency for instance, if you place a transparent GIF image in a blue table cell, then the background color of that image will turn blue.
- It supports interlacing i.e., it provide a low resolution preview of the image to the viewers while it downloads.
- It can be used as an image map, which allows the viewer to click on the image, as they would a regular link to another site.
When to use GIF format
GIF format is better for images with fewer colors, especially with flat colors. This format –
- Is suitable for designing sharp-edged line art (for e.g. logos) with a limited number of colors.
- Can be used for low-resolution film clips and small animations.
- Is ideal for black and white graphics, cartoons, or any simple-text based images.
- Is very useful if you want to have an image with a transparent background.
JPEG Format
JPEG is an abbreviation for Joint Photographic Experts Group; name of the committee that created the JPEG standard. It supports 16.7 million colors and is primarily used for photographic images. It typically achieves 10:1 compression ratio with little perceptible loss in image quality. The degree of compression can be adjusted, allowing a selectable trading off between image quality and storage size. JPEGs have a file extension of ‘.JPEG’, ‘.JPE’, or ‘.JPG’.
The advantages of JPEG format –
- JPEG files can be saved as a Progressive JPEG, which is very similar to the interlaced GIF.
- It can be used for saving metallic images (bronze, steel, copper, silver and gold). Since, these types of images are created using different types of gradient.
When to Use
JPEG format is used for images that have millions of colors. This format –
- Is best for images or photographs with fine tonal variations in colors, such as metallic images or images with gradients.
- Is suitable for grey-scale or full-color images.
