Unit 2 Data Representations

Embed Size (px)

Citation preview

  • 8/13/2019 Unit 2 Data Representations

    1/4

    UNIT 2 DATA REPRESENTATIONS

    In this chapter we look at images, starting with 1-bit images, then 8-bit images and howto print them, then 24-bit color images and 8-bit versions of color images. The specifics of fileformats for storing such images will also be discussed.

    Graphics/Image Data Type:The number of file formats used in multimedia. For example: in given below table: it

    shows a list of file formats used in the multimedia.

    1-bit Image (Binary Image):Image consists of pixel or pels (picture element in digital image). A 1-bit image consists

    of ON and OFF bits only and thus is the simplest type of image. Each pixel is stored as a singlebit (0 or 1). Hence such an image is also called as binary image. It also called a 1-bitmonochrome image since it contains no color.

    8-bit Gray-Level Image:Each pixel has a gray value between 0 and 255. Each pixel is represented by a single

    byte. The entire image can be thought of as two-dimensional array of pixel values. We refer tosuch an array as a bitmap. Image resolution refers to the number of pixel in a digital image.Fairly image quality is based on the resolution only. Such an array must be stored in hardwareis called frame buffer. Special hardware called a video card is used for this purpose.

    You can think of 8-bit image as a set of 1-bit bitplanes. Where each plane is consists of a1-bit representation of the image at higher and higher level of elevation. From the diagram: each

  • 8/13/2019 Unit 2 Data Representations

    2/4

    bitplane can have a value of 0 or 1 at each pixel but together all the bitplanes makes up a singlebyte that stores values between 0 and 255. So a 640X480 gray scale image required 300 Kilobytes(307,000) of storage.

    24-bit Color Image:In a color 24-bit image, each pixel is represented by three bytes, usually representing

    RGB. Since each value is in the range 0-255. This supports 256 x 256 x 256 or total of 16,777,216possible combined colors. A 640 X 480 24-bit color image would require 921.6 Kilobytes ofstorage without any compression.

    An important point to note is that many 24-bit color images are actually stored as 32 bitimages, with the extra byte of data for each pixel storing an alpha value representing specialeffect information.

    8-bit Color Images:If space is a concern, reasonably accurate color images can be obtained by quantizing the

    color information to collapse it. Many systems can make use of only 8 bits of color informationin producing a screen image instead of 24 bits. If a system has the electronics too actually use24bit information, backward compatibility demands that we understand 8bit color image files.

    This 8 bit color image concept is done by the concept of Lookup Table. Mostly lookup

    table is called as palette.

    Here, from the above figure: 8 bit gives the information of the lookup table index only notgiving the color information. So this method is concern with the space. Here simple animation ispossible by simply changing the color table is called palette animation.

  • 8/13/2019 Unit 2 Data Representations

    3/4

    Popular File Formats:Some popular file formats for information exchange described below:

    GIF:Graphics Interchange Format (GIF) was devised by UNISYS Corporation. Initially it is

    used for transmitting graphical image over phone lines via modems. It uses the Lempel-Ziv-

    Welch algorithm for compression. This GIF standard is limited to 8-bit color image only. It isgood for drawing and graphics with limited colors. GIF has two flavors:

    GIF87a GIF89a

    This file formats are supports simple animation by a graphics control extension block. Coreldraw allows access to and editing of GIF images.

    JPEG:The most important current standard for image compression is JPEG (Joint Photographic

    Experts Group). This standard was created by a working group of the InternationalOrganization for Standardization (ISO). It gives the high rate of compression. Simple tricksusing: values are divided by some large integer and truncated. In this case small values arezeored out. Then a scheme for representing long runs of zeros efficiently is applied.

    JPEG allow the user to set the quality of the image or compression ratio. In compressionwith Q=75% yields the image size 5.6% of the original.

    PNG:PNG (Portable Network Graphics) is a system independent image format. Mostly it is

    used in in internet. It is developed by the UNISYS Corporation with LZW compression method.A special feature of this file format is: support up to 48 bits of color information. It contains thegamma correction information for correct display of color image and alpha channel informationfor control of transparency.

    TIFF:Tagged Image File Format (TIFF)is developed by the Aldus Corporation in 1980. Later

    it was supported the Microsoft. It is support for attachment of additional information providesa great deal of flexibility. TIFF can store many different types of images: 1-bit, grayscale, 8-bit,24-bit RGB, and so on.

    EXIT:Exchange Image File is an image format for digital camera. It is developed in 1995 by

    JEITA (Japan Electronics and Information Technology industries Association). CompressedEXIF files use the baseline JPEG format.

    Graphics Animation Files:PS and PDF:

    PosScript is an important language for typesetting. And many high-end printers have apostscript interpreter built in to them. Postscript is a vector based format. Page elements areessential defined in terms of vectors. Fonts also defined this way. Postscript files are stored asASCII. Therefore files are often large.

    Portable Document Format is useful file format for text and figures. LZW compression isused in this type.

  • 8/13/2019 Unit 2 Data Representations

    4/4

    Windows WMF:

    Windows Meta File is a native vector file format for the Microsoft Windows Operatingenvironment. A WMF file actually consists of a collection of Graphics Device Interface (GDI)function calls, also native to the window environment.

    Windows BMP:BitMap is the major system standard graphics file format for Microsoft Windows. It is

    used in Microsoft Paint and other programs. It makes use of run length encoding compressionand can fairly efficiently store 24-bit bitmap images.

    X Windows PPMThis is the graphics format for the X Windows System. Portable PixMap (PPM) support

    24-bit color bitmaps.