Multimedia Images & Graphics


An image consists of a rectangular array of dots called pixels. The size of the image is specified in terms of width X height, in numbers of the pixels. The physical size of the image, in inches or centimeters, depends on the resolution of the device on which the image is displayed. The resolution is usually measured in DPI (Dots Per Inch). An image will appear smaller on a device with a higher resolution than on one with a lower resolution. For color images, one needs enough bits per pixel to represent all the colors in the image. The number of the bits per pixel is called the depth of the image.

Image data types

Images can be created by using different techniques of representation of data called data type like monochrome and colored images. Monochrome image is created by using single color whereas colored image is created by using multiple colors. Some important data types of images are following:

  • 1-bit images- An image is a set of pixels. Note that a pixel is a picture element in digital image. In 1-bit images, each pixel is stored as a single bit (0 or 1). A bit has only two states either on or off, white or black, true or false. Therefore, such an image is also referred to as a binary image, since only two states are available. 1-bit image is also known as 1-bit monochrome images because it contains one color that is black for off state and white for on state.

    A 1-bit image with resolution 640*480 needs a storage space of 640*480 bits.

    640 x 480 bits. = (640 x 480) / 8 bytes = (640 x 480) / (8 x 1024) KB= 37.5KB.

    The clarity or quality of 1-bit image is very low.

  • 8-bit Gray level images- Each pixel of 8-bit gray level image is represented by a single byte (8 bits). Therefore each pixel of such image can hold 28=256 values between 0 and 255. Therefore each pixel has a brightness value on a scale from black (0 for no brightness or intensity) to white (255 for full brightness or intensity). For example, a dark pixel might have a value of 15 and a bright one might be 240.

    A grayscale digital image is an image in which the value of each pixel is a single sample, which carries intensity information. Images are composed exclusively of gray shades, which vary from black being at the weakest intensity to white being at the strongest. Grayscale images carry many shades of gray from black to white. Grayscale images are also called monochromatic, denoting the presence of only one (mono) color (chrome). An image is represented by bitmap. A bitmap is a simple matrix of the tiny dots (pixels) that form an image and are displayed on a computer screen or printed.

    A 8-bit image with resolution 640 x 480 needs a storage space of 640 x 480 bytes=(640 x 480)/1024 KB= 300KB. Therefore an 8-bit image needs 8 times more storage space than 1-bit image.

  • 24-bit color images - In 24-bit color image, each pixel is represented by three bytes, usually representing RGB (Red, Green and Blue). Usually true color is defined to mean 256 shades of RGB (Red, Green and Blue) for a total of 16777216 color variations. It provides a method of representing and storing graphical image information an RGB color space such that a colors, shades and hues in large number of variations can be displayed in an image such as in high quality photo graphic images or complex graphics.

    Many 24-bit color images are stored as 32-bit images, and an extra byte for each pixel used to store an alpha value representing special effect information.

    A 24-bit color image with resolution 640 x 480 needs a storage space of 640 x 480 x 3 bytes = (640 x 480 x 3) / 1024=900KB without any compression. Also 32-bit color image with resolution 640 x 480 needs a storage space of 640 x 480 x 4 bytes= 1200KB without any compression.


    • Require large storage space

    • Many monitors can display only 256 different colors at any one time. Therefore, in this case it is wasteful to store more than 256 different colors in an image.

  • 8-bit color images - 8-bit color graphics is a method of storing image information in a computer's memory or in an image file, where one byte (8 bits) represents each pixel. The maximum number of colors that can be displayed at once is 256. 8-bit color graphics are of two forms. The first form is where the image stores not color but an 8-bit index into the color map for each pixel, instead of storing the full 24-bit color value. Therefore, 8-bit image formats consists of two parts: a color map describing what colors are present in the image and the array of index values for each pixel in the image. In most color maps each color is usually chosen from a palette of 16,777,216 colors (24 bits: 8 red, 8green, 8 blue).

    The other form is where the 8-bits use 3 bits for red, 3 bits for green and 2 bits for blue. This second form is often called 8-bit true color as it does not use a palette at all. When a 24-bit full color image is turned into an 8-bit image, some of the colors have to be eliminated, known as color quantization process.

    A 8-bit color image with resolution 640 x 480 needs a storage space of 640 x 480 bytes=(640 x 480) / 1024KB= 300KB without any compression.

Color lookup tables

A color loop-up table (LUT) is a mechanism used to transform a range of input colors into another range of colors. Color look-up table will convert the logical color numbers stored in each pixel of video memory into physical colors, represented as RGB triplets, which can be displayed on a computer monitor. Each pixel of image stores only index value or logical color number. For example if a pixel stores the value 30, the meaning is to go to row 30 in a color look-up table (LUT). The LUT is often called a Palette.

Characteristic of LUT are following:

  • The number of entries in the palette determines the maximum number of colors which can appear on screen simultaneously.

  • The width of each entry in the palette determines the number of colors which the wider full palette can represent.

A common example would be a palette of 256 colors that is the number of entries is 256 and thus each entry is addressed by an 8-bit pixel value. Each color can be chosen from a full palette, with a total of 16.7 million colors that is the each entry is of 24 bits and 8 bits per channel which sets the total combinations of 256 levels for each of the red, green and blue components 256 x 256 x 256 =16,777,216 colors.

Image file formats

  • GIF- Graphics Interchange Formats- The GIF format was created by Compuserve. It supports 256 colors. GIF format is the most popular on the Internet because of its compact size. It is ideal for small icons used for navigational purpose and simple diagrams. GIF creates a table of up to 256 colors from a pool of 16 million. If the image has less than 256 colors, GIF can easily render the image without any loss of quality. When the image contains more colors, GIF uses algorithms to match the colors of the image with the palette of optimum set of 256 colors available. Better algorithms search the image to find and the optimum set of 256 colors.

    Thus GIF format is lossless only for the image with 256 colors or less. In case of a rich, true color image GIF may lose 99.998% of the colors. GIF files can be saved with a maximum of 256 colors. This makes it is a poor format for photographic images.

    GIFs can be animated, which is another reason they became so successful. Most animated banner ads are GIFs. GIFs allow single bit transparency that is when you are creating your image, you can specify which color is to be transparent. This provision allows the background colors of the web page to be shown through the image.

  • JPEG- Joint Photographic Experts Group- The JPEG format was developed by the Joint Photographic Experts Group. JPEG files are bitmapped images. It store information as 24-bit color. This is the format of choice for nearly all photograph images on the internet. Digital cameras save images in a JPEG format by default. It has become the main graphics file format for the World Wide Web and any browser can support it without plug-ins. In order to make the file small, JPEG uses lossy compression. It works well on photographs, artwork and similar materials but not so well on lettering, simple cartoons or line drawings. JPEG images work much better than GIFs. Though JPEG can be interlaced, still this format lacks many of the other special abilities of GIFs, like animations and transparency, but they really are only for photos.

  • PNG- Portable Network Graphics- PNG is the only lossless format that web browsers support. PNG supports 8 bit, 24 bits, 32 bits and 48 bits data types. One version of the format PNG-8 is similar to the GIF format. But PNG is the superior to the GIF. It produces smaller files and with more options for colors. It supports partial transparency also. PNG-24 is another flavor of PNG, with 24-bit color supports, allowing ranges of color akin to high color JPEG. PNG-24 is in no way a replacement format for JPEG because it is a lossless compression format. This means that file size can be rather big against a comparable JPEG. Also PNG supports for up to 48 bits of color information.

  • TIFF- Tagged Image File Format- The TIFF format was developed by the Aldus Corporation in the 1980 and was later supported by Microsoft. TIFF file format is widely used bitmapped file format. It is supported by many image editing applications, software used by scanners and photo retouching programs.

    TIFF can store many different types of image ranging from 1 bit image, grayscale image, 8 bit color image, 24 bit RGB image etc. TIFF files originally use lossless compression. Today TIFF files also use lossy compression according to the requirement. Therefore, it is a very flexible format. This file format is suitable when the output is printed. Multi-page documents can be stored as a single TIFF file and that is way this file format is so popular. The TIFF format is now used and controlled by Adobe.

  • BMP- Bitmap- The bitmap file format (BMP) is a very basic format supported by most Windows applications. BMP can store many different type of image: 1 bit image, grayscale image, 8 bit color image, 24 bit RGB image etc. BMP files are uncompressed. Therefore, these are not suitable for the internet. BMP files can be compressed using lossless data compression algorithms.

  • EPS- Encapsulated Postscript- The EPS format is a vector based graphic. EPS is popular for saving image files because it can be imported into nearly any kind of application. This file format is suitable for printed documents. Main disadvantage of this format is that it requires more storage as compare to other formats.

  • PDF- Portable Document Format- PDF format is vector graphics with embedded pixel graphics with many compression options. When your document is ready to be shared with others or for publication. This is only format that is platform independent. If you have Adobe Acrobat you can print from any document to a PDF file. From illustrator you can save as .PDF.

  • EXIF- Exchange Image File- Exif is an image format for digital cameras. A variety of tage are available to facilitate higher quality printing, since information about the camera and picture - taking condition can be stored and used by printers for possible color correction also includes specification of file format for audio that accompanies digital images.

  • WMF- Windows MetaFile- WMF is the vector file format for the MS-Windows operating environment. It consists of a collection of graphics device interface function calls to the MS-Windows graphice drawing library.Metafiles are both small and flexible, hese images can be displayed properly by their proprietary softwares only.

  • PICT- PICT images are useful in Macintosh software development, but you should avoid them in desktop publishing. Avoid using PICT format in electronic publishing-PICT images are prone to corruption.

  • Photoshop- This is the native Photoshop file format created by Adobe. You can import this format directly into most desktop publishing applications.