Britannica Sources used in this answer

How do pixels and bitmaps work in raster graphics?

Created from Britannica articles using AI. AI can make mistakes, so verify using Britannica articles.

In raster graphics, images are represented by a bitmap, which is a grid-based structure stored in memory. This grid is composed of tiny, uniformly sized picture elements known as pixels.12

How Pixels and Bitmaps Function

  • Grid Arrangement: Pixels are organized into a two-dimensional array of rows and columns. The total number of pixels in this grid defines the image's resolution.2
  • Data Representation: A bitmap acts as an array of binary data that tells the computer how to "paint" each pixel on a display.3
  • Color Depth: Each pixel contains one or more bits of information, known as color depth, which determines the range of colors or tones it can represent. For instance, a simple black-and-white image may use one bit per pixel, while "truecolor" images use 24 bits per pixel to support over 16 million possible color states.2

Because they support subtle gradations and complex color, raster graphics are ideal for photographs and detailed imagery. However, unlike vector graphics, raster images can lose quality when resized, as they are fixed to a specific grid of pixels.21