Bitmap
A bitmap is a digital image file format or data structure that represents a graphic as a rectangular grid of individual pixels, or picture elements. Each pixel is assigned a specific color value, and when viewed together, the pixels form a complete image. Bitmaps are also known as raster graphics.
How a bitmap works
Grid of pixels: A bitmap is based on a fixed grid of colored squares. The detail and clarity of the image are directly tied to the number of pixels it contains. When you enlarge a bitmap, the individual pixels are stretched, which causes the image to look blocky or "pixelated".
Color depth: The number of bits used to define the color of each pixel is called the color depth. This determines the number of colors a bitmap can display.
Monochrome (1-bit): In its most basic form, a bitmap can use a single bit to represent a black or white pixel.
24-bit color: A common standard for full-color images is 24 bits per pixel, allowing for more than 16 million colors.
File structure: The file itself includes a header that contains information like the image's dimensions and color depth. This is followed by the grid data that specifies the color of each pixel, row by row.