Bitmap
How it works
The image is stored as a two-dimensional matrix of pixels with fixed dimensions. Each pixel holds a color value encoded in a set number of bits (color depth), most often in the RGB or RGBA (with an alpha/transparency channel) model. Display maps each matrix cell to a point on the screen. Enlarging the image requires interpolating missing pixels, which produces visible pixelation or blur because the original pixel count is fixed. The uncompressed data size grows proportionally to width ร height ร color depth; file formats (PNG, JPEG) add lossless or lossy compression to reduce that size.
Problem solved
It lets images with arbitrarily complex color โ photographs, textures, gradients โ be stored and displayed faithfully, where describing them with a finite set of vector shapes is impractical. It reduces an image to a simple, regular data model (a matrix of pixels) that display and processing hardware (screens, GPUs, image sensors) handle directly.
Hyperparameters (configurable axes)
Number of pixels horizontally and vertically; sets the fixed, maximum level of image detail.
Bits per pixel; determines how many distinct colors can be represented.
How each pixel's color is encoded.
Method of reducing the raster data size in the file.
Computational complexity
Space complexity: O(w ยท h ยท d).