Graphics File Formats

There are many different types of graphics files, ranging from the common, like The Windows Bitmap (identified by the file extension), Graphics Interchange Format/GIF (.gif), Joint Photographics Expert Group format/JPEG (.jpg) and Portable Network Graphics (.png) to hundreds of obscure formats.

Ways of Storing Graphics

There are two principal kinds of graphics formats, vector graphics and raster graphics.

Vector Graphics

Sometimes, computer graphics are stored as a series of instructions, to draw certain polygons in certain places with certain colours. Vector graphics files are normally relatively small in size.

Raster Graphics

However, more frequently, graphics are stored as a series of dots of colour (Unless it's an American computer, in which case it stores a series of dots of color). These dots of colour are known as pixels. Raster graphics files are normally relatively large in size.

Which is better?

As vector graphics normally require far less storage space, simplistically one would say that vector graphics are better. However to adopt this position would be like saying "a car is always better than a lorry because it consumes less petrol/gas. A car may require less petrol, but a large item that needs to be moved might not fit in it. Raster files, despite their size are useful for storing photographs. This is because a digital photograph is a discrete sample of a continuous function (i.e. if you drew a graph of something you see in terms of its constituent colour parts it would be a curve, whereas when you take a photograph and store it on a computer, points along that curve are stored, as the exact function of the image can never be ascertained.

Q. Can a photograph be stored in vector format? A. Yes and No. You cannot store the function of a photograph in vector format, however, if you wished to, you could store a series of instructions to draw each individual pixel in a vector format. This however would be very inefficient.

Why Are There So Many Graphics Formats?

You may now be wondering, if there are only two different ways of storing graphics, why are there five or six different formats. The answer is simple: compression. Of the four mainstream graphics formats (BMP, JPEG, GIF and PNG), all four store information in raster format. Raster files are very large, which is a large problem when they are exchanged over the internet, therefore, each type of file differs in the way it compresses its data. Below is a brief description of the compression method used by each format and what it is useful for:

GraphicsFileFormats (last edited 2008-07-09 05:47:50 by localhost)