Bitmap
Bitmap: a representation using bits or pixels—either a compact bit array for flags/indexes or a raster (pixel-based) image with explicit color values. Covers structure, formats, uses and differences from vectors.
Overview
A bitmap is a representation of information as an array of binary values. In computing the term commonly denotes two related concepts: a bit array (a compact sequence of binary flags, sometimes called a bitset or bitmap index) and a raster image (a grid of pixels, each storing color or intensity). Both senses share the idea of fixed positions addressed by indices, but they are used for different purposes: one for compact data structures, the other for visual imagery.
Raster bitmaps
Raster bitmaps describe images by width and height in pixels and a color representation per pixel. Color may be encoded directly (truecolor) or indirectly through a palette (indexed color). Additional channels such as alpha provide per-pixel transparency. The memory required for an uncompressed bitmap is determined by dimensions and bits per pixel; image files may add headers, metadata and compression.
Bit arrays and indexes
As a data structure, a bitmap stores boolean values compactly, using one bit per item. Bitmaps are used for membership sets, occupancy maps, bloom filters, and fast bitmap indexes in databases because bitwise operations are efficient. They are often manipulated with logical operations, shifts and population-count instructions.
Formats and compression
- Raster image formats differ mainly by how they encode color and whether they use lossless or lossy compression.
- Indexed formats store references to a palette to save space at low color counts; truecolor stores direct color values for greater fidelity.
- Compression techniques trade between quality, file size and decoding complexity; some preserve every pixel exactly, others discard information to reduce size.
Operations and uses
Common operations on bitmaps include scaling (resampling), cropping, compositing with alpha, filtering and color conversion. Bitmaps are used for photographs, icons, graphical user interfaces, textures in games and scanned documents. Bit arrays are important in systems programming, search indexes and resource allocation.
Advantages and limitations
Bitmaps provide precise pixel control and are simple to render on raster displays, but they lose quality when scaled beyond their resolution. In contrast, vector graphics represent shapes mathematically and scale without loss; the two approaches are often combined in modern workflows.
Terminology and history
The term originated with early graphics hardware and low-level programming where memory was organized as arrays of bits or bytes controlling display dots. Today the context—image versus data structure—determines its specific meaning.
Related articles
Author
AlegsaOnline.com Bitmap Leandro Alegsa
URL: https://en.alegsaonline.com/art/11844