Three Image Types
Lossless
Aim to hold onto information - high rez imagery
- TIFF
- RAW
- PSD
- EPS
Lossy
It is possible to compress many types of digital data in a way that reduces the size of a computer file needed to store it, or the bandwidth needed to stream it, with no loss of the full information contained in the original file. A picture, for example, is converted to a digital file by considering it to be an array of dots and specifying the color and brightness of each dot. If the picture contains an area of the same color, it can be compressed without loss by saying "200 red dots" instead of "red dot, red dot, ...(197 more times)..., red dot." The original contains a certain amount of information; there is a lower limit to the size of file that can carry all the information. As an intuitive example, most people know that a compressed ZIP file is smaller than the original file, but repeatedly compressing the file will not reduce the size to nothing and will in fact usually increase the size.
In many cases, files or data streams contain more information than is needed for a particular purpose. For example, a picture may have more detail than the eye can distinguish when reproduced at the largest size intended; likewise, an audio file does not need a lot of fine detail during a very loud passage. Developing lossy compression techniques as closely matched to human perception as possible is a complex task. Sometimes the ideal is a file that provides exactly the same perception as the original, with as much digital information as possible removed; other times, perceptible loss of quality is considered a valid trade-off for the reduced data.
Gif
- Supports 256 total colors
- Flat graphic files (e.g. logos, vector art)
- Light file size
- Animation
- Transparency
The Graphics Interchange Format (GIF) is a bitmap image format that was introduced by CompuServe in 1987 and has since come into widespread usage on the World Wide Web due to its wide support and portability. The format supports up to 8 bits per pixel thus allowing a single image to reference a palette of up to 256 distinct colors. The colors are chosen from the 24-bit RGB color space. It also supports animations and allows a separate palette of 256 colors for each frame. The color limitation makes the GIF format unsuitable for reproducing color photographs and other images with continuous color, but it is well-suited for simpler images such as graphics or logos with solid areas of color.
GIF images are compressed using the Lempel-Ziv-Welch (LZW) lossless data compression technique to reduce the file size without degrading the visual quality. GIFs are suitable for sharp-edged line art (such as logos) with a limited number of colors. This takes advantage of the format's lossless compression, which favors flat areas of uniform color with well defined edges.
GIFs can be used to store low-color sprite data for games, small animations and low-resolution film clips. In view of the general limitation on the GIF image palette to 256 colors, it is not usually used as a format for digital photography. Digital photographers use image file formats capable of reproducing a greater range of colors, such as TIFF, RAW or JPEG.
Jpg
- Supports millions of colors
- Better for photographs - continuous tone, highlights and shadows
- Compression Recipe - proprietary
- No Animation
- No Transparency
JPEG is a commonly used method of lossy compression for digital photography (image), it stands for Joint Photographic Experts Group, the name of the committee that created the JPEG standard and also other still picture coding standards. The degree of compression can be adjusted, allowing a selectable tradeoff between storage size and image quality. JPEG typically achieves 10:1 compression with little perceptible loss in image quality. JPEG compression is used in a number of image file formats. JPEG/Exif is the most common image format used by digital cameras and other photographic image capture devices; along with JPEG/JFIF, it is the most common format for storing and transmitting photographic images on the World Wide Web.[citation needed] These format variations are often not distinguished, and are simply called JPEG.
JPEG compression artifacts blend well into photographs with detailed non-uniform textures, allowing higher compression ratios. The very high compression ratio severely affects the quality of the image, although the overall colors and image form are still recognizable. However, the precision of colors suffer less (for a human eye) than the precision of contours (based on luminance). This justifies the fact that images should be first transformed in a color model separating the luminance from the chromatic information, before subsampling the chromatic planes (which may also use lower quality quantization) in order to preserve the precision of the luminance plane with more information bits.
PNG
Portable Network Graphics is a bitmapped image format that employs lossless data compression. PNG was created to improve upon and replace GIF (Graphics Interchange Format) as an image-file format not requiring a patent license. PNG supports palette-based images (with palettes of 24-bit RGB or 32-bit RGBA colors), grayscale images (with or without alpha channel), and full-color non-palette-based RGB[A] images (with or without alpha channel). PNG was designed for transferring images on the Internet, not for professional-quality print graphics, and therefore does not support non-RGB color spaces such as CMYK. here are two PNG formats: PNG-8 and PNG-24. The numbers are shorthand for saying "8-bit PNG" or "24-bit PNG."Png-8
- Supports 256 total colors
- Flat graphic files (e.g. logos, vector art)
- Light file size
- No Animation
- Transparency
Png-24
- Supports millions of colors
- Better for photographs - continuous tone, highlights and shadows
- Has no Compression Recipe - proprietary
- No Animation
- True Transparency (alpha)
Comparison Chart
Compression | > Million Colors | Transparency | Animation | |
.gif | ||||
.jpeg | ||||
.png-8 | ||||
.png-24 |