Search This Blog

Monday, 3 November 2014

Graphics formats

Broadly speaking, a graphics file consists of data that speci-fies the color of each pixel (dot) in an image. Since there are many ways this information can be organized, there are a variety of graphics file formats. The most important and widely used ones are summarized below.

BMP (Windows Bitmap)

In a bitmap format there is a group of bits (i.e. a binary value) that specifies the color of each pixel. Windows pro-vides standard bitmap (BMP) formats for 1-bit (2 colors or monochrome), 4-bit (16 colors), 8-bit (256 colors), or 24-bit (16 million colors). The Windows bitmap format is also called a DIB (device-independent bitmap) because the stored colors are independent of the output device to be used (such as a monitor or printer). The relevant device driver is responsible for translating the color to one actually used by the device. Because it is “native” to Windows, BMP is widely used, especially for program graphics resources.

Bitmap formats have the advantage of storing the exact color of every pixel without losing any information. How-ever, this means that the files can be very large (from hundreds of thousands of bytes to several megabytes for Windows screen graphics). BMP and other bitmap formats do support a simple method of compression called run-length encoding (RLE), where a series of identical pixels is replaced by a single pixel and a count. Bitmap files can be further compressed through the use of utilities such as the popular Zip program (see data compression).

EPS

EPS (Encapsulated PostScript) is a vector-based rather than bitmap (raster) format. This means that an EPS file consists not of the actual pixel values of an image, but the instruc-tions for drawing the image (including coordinates, colors, and so on). The instructions are specified as a text file in the versatile PostScript page description language. This for-mat is usually used for printing, and requires a printer that supports PostScript (there are also PostScript renderers that run entirely in software, but they tend to be slow and some-what unreliable).

GIF

GIF, or Graphics Interchange Format, is a bitmapped format promulgated by CompuServe. Instead of reserving enough space to store a large number of colors in each pixel, this format uses a color table that can hold up to 256 colors. Each pixel contains a reference (index into) the color table. This means that GIF works best with images that have rela-tively few colors and for applications (such as Web pages) where compactness is important. GIF also uses compres-sion to achieve compactness, but unlike the case with JPEG it is a lossless compression called LZW. There is also a GIF format that stores simple animations.

JPEG

JPEG, which stands for Joint Photographic Experts Group, is widely used for digital cameras because of its ability to highly compress the data in a color graphics image, allow-ing a reasonable number of high-resolution pictures to be stored in the camera’s onboard memory. The compression is “lossy,” meaning that information is lost during compres-sion (see data compression). At relatively low compression ratios (such as 10:1, or 10 percent of the original image size) changes in the image due to data loss are unlikely to be perceived by the human eye. At higher ratios (approaching 100:1) the image becomes seriously degraded. JPEG’s abil-ity to store thousands of colors (unlike GIF’s limit of 256) makes the format particularly suitable for the subtleties of photography.

PCX

PCX is a compressed bitmap format originally used by the popular PC Paintbrush program. In recent years it has been largely supplanted by BMP and TIFF.

TIFF

TIFF, or Tagged Image File Format, is also a compressed bitmap format. There are several variations by different vendors, which can lead to compatibility problems. Imple-mentations can use various compression methods, gener-ally leading to ratios of 1.5 to 1 to about 2 to 1.

No comments:

Post a Comment