askvity

What is bit mapped graphics?

Published in Graphics 3 mins read

Bit mapped graphics, also known as raster graphics, are digital images composed of a grid of individual pixels, each representing a specific color.

Understanding Bitmaps

Bitmaps are fundamental to how we display images on screens and print them. Each pixel in a bitmap stores color information, typically represented as a combination of red, green, and blue (RGB) values. The more pixels in an image (i.e., higher resolution), the greater the detail and quality.

How Bitmaps Work

  • Pixel Grid: A bitmap is structured as a rectangular grid (rows and columns) of pixels.
  • Color Information: Each pixel holds data specifying its color. This data is often represented using a specific number of bits per pixel (bpp), determining the range of possible colors. For instance:
    • 8 bpp: 256 colors
    • 24 bpp: True color (approximately 16.7 million colors)
  • File Formats: Bitmap images are stored in various file formats, such as:
    • BMP: A common, uncompressed format.
    • GIF: Uses compression and supports animation.
    • JPEG: A lossy compression format ideal for photographs.
    • PNG: Supports lossless compression and transparency.
    • TIFF: A flexible format often used for archival purposes.

Advantages and Disadvantages

Feature Advantages Disadvantages
Representation Direct representation of image data; suitable for complex images with varying colors and shades. Scaling can lead to pixelation (loss of quality); larger file sizes compared to vector graphics for simple images.
File Size Can be compressed using various algorithms (lossy or lossless). Uncompressed bitmaps can be very large.
Editing Pixel-level editing is possible, allowing for fine-grained control. Editing can be time-consuming for complex images.
Use Cases Photographs, complex illustrations, images where subtle color variations are crucial, display on digital screens, printing. Logos, simple graphics, illustrations where scalability is important.

Example

Think of a digital photograph. When you zoom in significantly, you can start to see the individual squares of color. These squares are the pixels that make up the bitmap graphic.

Bitmap vs. Vector Graphics

A key difference between bitmap and vector graphics is how they are defined. Bitmaps are pixel-based, while vector graphics are based on mathematical equations that define lines, curves, and shapes. This means vector graphics can be scaled infinitely without losing quality, whereas bitmaps will become pixelated when scaled up.

Related Articles