Tuesday, March 30, 2010

Image File Formats

GenXTechno Tags: , , , , , ,

GIF
GIF was developed by CompuServe to show images online (in 1987 for 8 bit video boards, before JPG and 24 bit color was in use). GIF uses indexed color, which is limited to a palette of only 256 colors (next page). GIF was a great match for the old 8 bit 256 color video boards, but is inappropriate for today's 24 bit photo images.
GIF files do NOT store the image's scaled resolution ppi number, so scaling is necessary every time one is printed. This is of no importance for screen or web images. GIF file format was designed for CompuServe screens, and screens don't use ppi for any purpose. Our printers didn't print images in 1987, so it was useless information, and CompuServe simply didn't bother to store the printing resolution in GIF files.
GIF is still an excellent format for graphics, and this is its purpose today, especially on the web. Graphic images (like logos or dialog boxes) use few colors. Being limited to 256 colors is not important for a 3 color logo. A 16 color GIF is a very small file, much smaller, and more clear than any JPG, and ideal for graphics on the web.

Tag Image File Format (TIFF)

Many image file formats have an image header with fixed fields containing information such as image dimensions, color space specification, etc. The TIFF file format is different in that it allows for a flexible set of information fields. There exists a specification for many of these information fields, called 'tags', ranging from the most fundamental, like image dimensions, over the most luxurious like copyright information, up to so-called 'private tags' or 'custom tags' that you can define to hold your own application specific information. The TIFF specification defines a framework for an image header called 'IFD' (Image File Directory) that is essentially a flexible set of specifically those tags that the TIFF writer software wishes to specify.
One final important difference between TIFF and most other image file formats is that TIFF defines support for multiple images in a single file. Such a file is then called 'multi-page' TIFF. Thus, the TIFF format is very well suited to e.g. store the many pages of a single fax in a single file.
Another major difference between most other image file formats and TIFF, is that TIFF allows for a wide range of different compression schemes and color spaces.
BMP
BMP is a standard file format for computers running the Windows operating system. The format was developed by Microsoft for storing bitmap files in a device-independent bitmap (DIB) format that will allow Windows to display the bitmap on any type of display device. The term “device independent” means that the bitmap specifies pixel color in a form independent of the method used by a display to represent color.

General information

Since BMP is a fairly simple file format, its structure is pretty straightforward. Each bitmap file contains:
  • a bitmap-file header: this contains information about the type, size, and layout of a device-independent bitmap file.
  • a bitmap-information header which specifies the dimensions, compression type, and color format for the bitmap.
  • a colour table, defined as an array of RGBQUAD structures, contains as many elements as there are colours in the bitmap. The colour table is not present for bitmaps with 24 color bits because each pixel is represented by 24-bit red-green-blue (RGB) values in the actual bitmap data area.
  • an array of bytes that defines the bitmap bits. These are the actual image data, represented by consecutive rows, or “scan lines,” of the bitmap. Each scan line consists of consecutive bytes representing the pixels in the scan line, in left-to-right order.
BMP files always contain RGB data. The file can be:
  • 1-bit: 2 colors (monochrome)
  • 4-bit: 16 colors
  • 8-bit: 256 colors.
  • 24-bit: 16777216 colors, mixes 256 tints of Red with 256 tints of Green and Blue

Portable Network Graphics (PNG)

The Portable Network Graphics (PNG) format was designed to replace the older and simpler GIF format and, to some extent, the much more complex TIFF format.
PNG really has three main advantages over GIF: alpha channels (variable transparency), gamma correction (cross-platform control of image brightness), and two-dimensional interlacing (a method of progressive display). PNG also compresses better than GIF in almost every case, but the difference is generally only around 5% to 25%, not a large enough factor to encourage folks to switch on that basis alone. One GIF feature that PNG does not try to reproduce is multiple-image support, especially animations; PNG was and is intended to be a single-image format only.
CGM (Computer Graphics Metafile)

It was specifically designed as a common format for the platform-independent interchange of bitmap and vector data, and for use in conjunction with a variety of input and output devices.
CGM uses three types of syntactical encoding formats. All CGM files contain data encoded using one of these three methods:
  • Character-based, used to produce the smallest possible file size for ease of storage and speed of data transmission
  • Binary encoded, which facilitates exchange and quick access by software applications
  • Clear-text encoded, designed for human readability and ease of modification using an ASCII text editor
CGM is intended for the storage of graphics data only. It is sometimes (erroneously) thought to be a data transfer standard for CAD/CAM data, like IGES, or a 3D graphic object model data storage standard. However, CGM is quite suited for the interchange of renderings from CAD/CAM systems, but not for the storage of the engineering model data itself.

Scalable Vector Graphics (SVG)

SVG is a language for describing two-dimensional graphics and graphical applications in XML. SVG 1.1 is a W3C Recommendation and is the most recent version of the full specification. SVG Tiny 1.2 is a W3C Recommendation, and targets mobile devices. There are various SVG modules under development which will extend previous versions of the specification, and which will serve as the core of future SVG developments.

No comments:

Post a Comment

Search This Blog