Bitmap in Computer Graphics



There are two primary ways to represent images: bitmap graphics (also known as raster graphics) and vector graphics. In this chapter, we will see bitmap graphics, exploring what they are, how they work, and how they differ from vector graphics. We will also discuss the key characteristics of bitmap images, including their advantages and limitations for a better understanding.

Bitmap or Raster Graphics

Bitmap graphics are the images made up of tiny dots called pixels (picture elements). These pixels are arranged in a grid or matrix, and each pixel represents a single color. The combination of these pixels creates the overall image.

The term "bitmap" means to how these individual pixels are mapped out to form the image. Bitmap images are commonly used in various applications, including digital photography, web images, and mobile device screens. They are the most popular format for photographs and images on the web because they can represent detailed and complex images with varying colors.

Parameters in Bitmap Images

At the core of a bitmap image is the pixel. A pixel is the smallest unit of a digital image, and each pixel contains information about its color and brightness.

The more pixels an image has, the more detail it can display. However, the quality of a bitmap image is dependent on its resolution, which is measured in

  • DPI (dots per inch) or
  • PPI (pixels per inch).

Example of Bitmap Image

Any image captured from a camera are raster or bitmap images. A photograph is made up of thousands of tiny pixels that together form the picture. If we zoom in closely on the image, we will notice individual pixels that appear as tiny squares of color. These pixels blend together at normal viewing distances to create the complete image of the flower.

Zooming and Quality Loss

When a bitmap image is zoomed in or enlarged beyond its original size, the pixels become visible, and the image quality starts to degrade. This is because the number of pixels remains the same, but they are stretched over a larger area, resulting in a blocky or blurry appearance. This is one of the major limitations of bitmap images, as their quality is closely tied to their resolution.

Zooming and Quality Loss

Characteristics of Bitmap Graphics

  • Pixel-Based − The defining feature of a bitmap image is that it is pixel-based. Each image is made up of individual pixels arranged in a grid. Every pixel has a specific color, and together, these pixels form the complete image.
  • Resolution-Dependent − Bitmap images are resolution-dependent, meaning that the quality of the image is tied to its resolution. The resolution refers to the number of pixels in the image, usually measured in DPI or PPI. The higher the DPI or PPI, the more detailed and sharper the image will be. However, when a bitmap image is scaled up, its quality decreases because the same number of pixels is spread over a larger area, making the individual pixels more noticeable.
  • Smooth Color Transitions − Bitmap images are ideal for representing images with smooth color transitions, such as photographs or paintings. Different colors blend smoothly in bitmap images, making it difficult to distinguish where one color ends and another begins. This makes them well-suited for complex images with subtle variations in color and shading.

Common File Formats

Bitmap images are stored in various file formats, each with its own properties and use cases. Some of the most common bitmap image formats include:

  • JPEG (Joint Photographic Experts Group) − Commonly used for photographs and web images due to its ability to compress large files.
  • PNG (Portable Network Graphics) − Supports transparency and is widely used for web graphics and logos.
  • GIF (Graphics Interchange Format) − Used for simple images and animations, supports only 256 colors.

Advantages of Bitmap Graphics

  • Detailed and Complex Images − Bitmap images are ideal for representing complex images with a high level of detail, such as photographs, paintings, and realistic scenes. The pixel-based nature of bitmap images allows for intricate detail, which is difficult to achieve with vector graphics.
  • Smooth Color Gradients − Bitmap images excel at displaying smooth color gradients and transitions. This makes them perfect for images where subtle shading and blending of colors are essential, such as digital artwork or photographs.
  • Wide Compatibility − Bitmap images are widely supported by most devices, operating systems, and image editing software. They can be easily viewed, edited, and shared across different platforms.

Limitations of Bitmap Graphics

  • Loss of Quality When Enlarged − One of the most significant drawbacks of bitmap images is that they lose quality when scaled up or zoomed in. This is because the image's resolution remains the same, and the pixels become more noticeable as the image size increases. This can result in a blurry or pixelated appearance.
  • Large File Sizes − Bitmap images, especially those with high resolution, can result in large file sizes. This is because every pixel in the image requires memory to store its color and brightness information. As a result, high-resolution bitmap images can take up significant storage space and may take longer to load or transmit.
  • Limited Scalability − Unlike vector graphics, which are resolution-independent, bitmap images do not scale well. As mentioned earlier, enlarging a bitmap image reduces its quality. This makes bitmap images less suitable for situations where images need to be resized frequently, such as logos or icons.

Example of Zooming in on a Bitmap Image

Bitmap Image − When you zoom in on the bitmap image will start to see individual pixels. These tiny dots form the shape of the letter. As we zoom in further, the image starts to lose clarity, and the edges of the letter become jagged or blurry.

Vector Image − In contrast, a vector image would not lose quality when zoomed in. This is because vector images are based on mathematical calculations rather than pixels. The edges remain crisp and sharp no matter how much you zoom in.

Zooming in on a Bitmap Image

Conclusion

In this chapter, we learned that bitmap images are made up of tiny dots called pixels, arranged in a grid or matrix, and are resolution-dependent. Bitmap images are good for displaying complex and detailed visuals, however they come with their own limitations such as losing quality when enlarged and having large file sizes. We also discussed the key differences between bitmap and vector graphics. Bitmap images are pixel-based, while vector images are based on mathematical calculations.

Advertisements