Go to previous pageGo to next page

1.5.2. Raster Graphics Formats

The following raster graphics are mostly used in the World Wide Web.

GIF (Graphics Interchange-Format)

GIF is a raster image format for pictures that use 256 distinct colours. GIFs are compressed files and are employed specially to reduce the amount of time it takes to transfer images over a network connection. A GIF file employs lossless LZW data compression so that the file size of an image may be reduced without degrading the visual quality (provided the image fits into 256 colours). GIF is normally used for diagrams, buttons, etc., that have a small number of colours. It is therefore not suitable for photographs.
With GIF it is possible to store several images in only one GIF-File. This method is mostly used for simple animations.

If you do not know what LZW (Lempel-Ziv-Welch) compression is have a look at the presented popup solutions. (Click here for more information)

GIF in few words:

  • lossless LZW data compression
  • at most 256 colours can be displayed
  • able to visualise termtransparency
Diagram stored as GIFDiagram stored as GIF



JPEG (Joint Photographic Experts Group)

JPEG is a commonly used standard method of lossy compression for photographic images. JPEG is the most common format used for storing and transmitting photographs on the World Wide Web. It is not as well suited for line drawings and other textual graphics because its compression method performs badly on these types of images.

JPEG in few words:

  • lossy compression
  • 16.7 Mio. colours
  • does not support transparency
  • adapted for colour gradients and photos
Photograph stored as JPEGPhotograph stored as JPEG (NEUMANN)



PNG (Portable Network Graphics)

The PNG format was designed to replace the GIF format.
PNG is a lossless raster image format. It offers a variety of transparency options. With truecolour and greyscale images either a single pixel value can be declared as transparent or an alpha channel can be added. For termpaletted images, alpha values can be added to palette entries.
PNG uses a lossless data compression method. To upgrade the compression of the images PNG supports preliminary filters which are applied to the image before the compression is applied. The principle of these preliminary filters is: for each image line, a filter method is chosen that predicts the colour of each pixel based on the colours of previous pixels and subtracts the predicted colour of the pixel from the actual colour. An image line filtered in this way is often more compressible than the raw image line would be, especially if it is similar to the line above. (WIKIPEDIA)
PNG is used for a large spectrum of graphics from little images such as diagrams up to complex images such as photographs.

important

Versions of Internet Explorer up to 6 do not support native alpha channel transparency.

PNG in few words:

  • lossless compression
  • full alpha channel and transparency support
  • 16.7 Mio. Colours
  • termW3C-Standard
Photograph stored as PNGPhotograph stored as PNG (NEUMANN) Diagram stored as PNGDiagram stored as PNG



Comparison of GIF, JPEG and PNG

The following table shows the comparison of the three presented raster graphics formats. Considering as example the termcolour gradient of a filling, the differences of these formats are best visualized.

GIF JPEG PNG


Go to previous page
Go to next page