CGMA UNIT 7

Graphics Image File Formats

Raster Format

Raster and vector images are used to create computer graphics.  Raster Graphics are bitmaps and bitmap is grid of individual pixels that are collectivley compose an image. These pixels are coded with some shade. So raster images are pixel based and resolution specifuc. Resolution in raster graphics is measured in dpi (dot per inch). Most common raster formats are BMP, GIF, JPEG, TIFF, PNG. 
On the other hand Vector graphics are based on mathematical formulas. They are based on geomatric primitives such as polygons, lines, curves, circles and rectangles. They are more versatile, flexible and easy to use as compare to raster graphics. They are not resolution based so they need not to memorize the content of millions of tiny pixels. These files are smaller tahn raster files. Common vector formats are AI, EPS,SVG  and sometimes PDF. 

Bitmap (BMP) Format

It is also known as bitmap image file or device independent bitmap (DIB) or simply a bitmap. It is a raster image file format. A device-independent bitmap (DIB) is a format used to define device-independent bitmaps in various color resolutions. The main purpose of DIBs is to allow bitmaps to be moved from one device to another (hence, the device-independent part of the name). A DIB is an external format, in contrast to a device-dependent bitmap, which appears in the system as a bitmap object. 
A typical BMP file usually contains the following blocks of data: 
  • BMP File Header Stores general information about the BMP file. 
  • Bitmap Information (DIB header) Stores detailed information about the bitmap image. 
  • Color Palette Stores the definition of the colors being used for indexed color bitmaps. 
  • Bitmap Data Stores the actual image, pixel by pixel.

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 color table, defined as an array of RGBQUAD structures, contains as many elements as there are colors in the bitmap. The color 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

Graphics Interchange Format (GIF)

GIF is the first file format which is inteded for the internet. It also allows data compression, which helps for image quality after degrading the file size. The GIF file format supports the 8-bit color graphics method of storing image information, where each pixel is represented by an-bit byte. This way, GIF makes it possible for a single image to refer to a palette of 256 different colors within the 24-bit RGB color space at any time. It is mainly used for storing plain images such as graphics or logos featuring solid areas of uniform color and well defined edges. A very useful advantage of the .gif format over the newer ones is the support for animations. GIF has color limitations. One can use its lossless compression advantages for storing low-color data for games or for low-resolution film clips. 

Joint Photographic Experts Group (JPEG)

It is commonly used method of lossy compression for digital images. It typically achieve 10:1 compression with little perceptible loss in image quality. This degree of compression can be adjusted, to allow selectable tradeoff between storage size and image quality. It is most widely used image compression standard in the world. The basis for JPEG is the discrete cosine transform (DCT).

Tagged Image File Format (TIFF) 

It is variable-resolution bitmapped image format. It is very common for transporting color or gray-scale images into page layout applications, but is less suited to delivering web content. These files are large and of very high quality. TIFF images are highly portable. Four verions of TIFF images are avilable : bilevel (black and white), gray scale, palette (i.e. indexed), and RGB (i.e. true color). TIFF files may or may not be compressed. Even after compression, TIFF files are usually much larger than similar GIF or JPEG files. 

Portable Network Graphics (PNG) 

PNG की शुरुआत दो इस्राइल researchers ने 1977-1978 मे की थी। इन्होने दो lossless data compression algorithms LZ77 और LZ78 को combine किया था। परंतु PNG सही तरीके से 1994 से उपयोग किया जा रहा है जब GIF की तुलना मे ज्यादा अच्छा,छोटा,और फ्री फ़ाइल format जरूरी लगा। सबसे पहले PNG draft को PBF कहा गया जिसका पूरा नाम होता है portable bitmap format। सबसे पहले इसमे तीन byte सिग्नेचर होते थे पहला chunk नंबर दूसरा maximum pixel की depth 8 bits होती थी और कोई भी compression method उपयोग नहीं की जाती थी। फिर एक week के अंदर इसमे सारे features समाहित किए गए, जैसे delta-filtering, deflate compression, 24-bit support इसका नाम PNG और भी बहुत कुछ। इसमे से बहुत से features accept नहीं किए गए । PNG का पहला वर्किंग मोडेल 1995 मे आया। PNG को develop करने का मूल उद्देश्य एक lightweight model को लाना था जो की TIFF और JPEG की तुलना मे lightweight हो। और यह उद्देश्य PNG ने पूरा भी किया।
       PNG फ़ारमैट की बहुत सारी विशेषताये होती हैं। यह इमेज को ट्रांसपरेंसी लेवेल देने के साथ साथ color transparency भी करता है। PNG format मे image interlacing horizonatl और vertical दोनों दिशाओं मे एक साथ होता है, इसलिए image interlacing तीव्र होती है। अब image interlacing का मतलब यह है की bitmap image को इस तरह से encode किया जाए की यदि किसी व्यक्ति के पास आंशिक image भी receive हो तो उसे image की degraded copy मिल जाए, इस तरह image का अनुमान लगाया जा सकता है। PNG मे gamma correction की मदद से images के color की brightness को कम या ज्यादा किया जा सकता है। Gamma correction एक ऐसी तकनीक है जिससे camera, display device और visual system के बीच के अंतर को मिटाया जा सकता है। PNG मे image को उसके true color form मे या grey color form मे save किया जा सकता है। true color का मतलब image उसी तरह दिखे जिस तरह वह origanlly रहती है और grey कलर का मतलब image सिर्फ सफ़ेद और काले color के combinations मे ही दिखाई देगी । 

Differences

File type comparison chart

No comments

Powered by Blogger.