Monday, 10 February 2014

Explain all the types of Digital Images. Also differentiate between them.

When you want to put graphics on your website, you ll face an unexpected problem: what format should they be in? On their own computers, many people save pictures in Windows  default BMP (bitmap) format, but the files it creates are simply much too large to put on a website. They would take about a minute for visitors to download and use up all your bandwidth in the process.
When you put pictures on the web, you need to consider the trade-off you want between image quality and speed.

The following are the different types of image formats.
GIF:
The Graphics Interchange Format was developed in 1987 at the request of CompuServe, who needed a platform independent image format that was suitable for transfer across slow connections. It is a compressed (lossless) format (it uses the LZW compression) and compresses at a ratio of between 3:1 and 5:1.
The Graphical Interchange Format (GIF) is one of the most widely used image formats on the web. GIF files are recognizable by their .gif file extension. GIF is suitable for images with sharp edges and relatively few gradations of color, such as line art, cartoons, and text. You can also create background transparencies and animations using GIF images. It is an 8 bit format, which means the maximum number of colors supported by the format is 256.
There are two GIF standards, 87a and 89a (developed in 1987 and 1989 respectively). The 89a standard has additional features such as improved interlacing, the ability to define one color to be transparent and the ability to store multiple images in one file to create a basic form of animation. It is commonly used for fast loading web pages. It also makes a great banner or logo for your webpage. Animated pictures are also saved in GIF format. For example, a flashing banner would be saved as a Gif file.

JPEG:
JPEG (pronounced "jay-peg") is a standardized image compression mechanism. JPEG stands for Joint Photographic Experts Group, the original name of the committee that wrote the standard. JPEG compresses either full-color (24 bit) or grayscale images, and works best with photographs and artwork. For geometric line drawings, lettering, cartoons, computer screen shots, and other images with flat color and sharp borders, the PNG and GIF image formats are usually preferable. The extensions for JPEG are .jpg, .jpeg, .jpe.
JPEG uses a lossy compression method, meaning that the decompressed image isn't quite the same as the original. (There are lossless image compression algorithms, but JPEG achieves much greater compression than is possible with lossless methods.) This method fools the eye by using the fact that people perceive small changes in color less accurately than small changes in brightness.
JPEG was developed for two reasons: it makes image files smaller and it stores 24-bit per pixel color data (full color) instead of 8-bit per pixel data. Making image files smaller is important for storing and transmitting files. Being able to compress a 2MB full-color file down to, for example, 100KB makes a big difference in disk space and transmission time. JPEG can easily provide 20:1 compression of full-color data. (With GIF images, the size ratio is usually more like 4:1.)

TIFF:
Tagged Image File Format (TIFF) is a variable-resolution bit mapped image format developed by Aldus (now part of Adobe) in 1986. TIFF is very common for transporting color or gray-scale images into page layout applications, but is less suited to delivering web content.

The characterstics of TIFF are:

  1. TIFF files are large and of very high quality. Baseline TIFF images are highly portable; most graphics, desktop publishing, and word processing applications understand them.
  2. The TIFF specification is readily extensible, though this comes at the price of some of its portability. Many applications incorporate their own extensions, but a number of application-independent extensions are recognized by most programs.
  3. Four types of baseline TIFF images are available: bi-level (black and white), gray scale, palette (i.e., indexed), and RGB (i.e., true color). RGB images may store up to 16.7 million colors. Palette and gray-scale images are limited to 256 colors or shades. A common extension of TIFF also allows for CMYK images.
  4. TIFF files may or may not be compressed. A number of methods may be used to compress TIFF files, including the Huffman and LZW algorithms. Even compressed, TIFF files are usually much larger than similar GIF or JPEG files.
PNG:
PNG (pronounced ping as in ping-pong; for Portable Network Graphics) was developed as a replacement for the GIF standard, partly because of legal entanglements resulting from GIF's use of the patented LZW compression scheme, and partly because of GIF's many limitations. PNG files are recognizable by their .png file extension.

PNG is superior to GIF in many ways, offering the following features:

  1. Images that are the same size or slightly smaller than their GIF counterparts, while keeping lossless compression
  2. Support for indexed colors, gray-scale, and RGB (millions of colors)
  3. Support for 2-D progressive rendering, which is based on pixels rather than lines (as in interlaced GIFs and progressive JPEGs); this means that contents of a progressively rendered PNG file become apparent earlier in the load process
  4. An alpha channel that allows an image to have multiple levels of opacity; whereas GIFs only allow a given pixel to be fully transparent or fully opaque., This feature lets you create images with degrees of transparency, better blending images with their backgrounds
  5. Gamma correction, which allows you to correct for differences in how an image will appear on different computer display systems
  6. File integrity checks, which help prevent problems while downloading or transferring PNG files

PNG does not support multiple images within the same image file, which means that you can't make animations with PNG, as you can with GIFs. For transmission of some types of images (e.g., true-color photographs and black and white images), other file formats may give better results. Most graphics applications, and virtually all browsers support the PNG format.
Unlike the GIF89a, the PNG format doesn't support animation since it can't contain multiple images. The PNG is described as "extensible," however. Software houses will be able to develop variations of PNG that can contain multiple, scriptable images.

2 comments: