Hubbry Logo
BitmapBitmapMain
Open search
Bitmap
Community hub
Bitmap
logo
7 pages, 0 posts
0 subscribers
Be the first to start a discussion here.
Be the first to start a discussion here.
Contribute something
Bitmap
Bitmap
from Wikipedia

In computing, a bitmap (also called raster) graphic is an image formed from rows of different colored pixels.[1] A GIF is an example of a graphics image file that uses a bitmap.[2]

As a noun, the term "bitmap" is very often used to refer to a particular bitmapping application: the pix-map, which refers to a map of pixels, where each pixel may store more than two colors, thus using more than one bit per pixel. In such a case, the domain in question is the array of pixels which constitute a digital graphic output device (a screen or monitor). In some contexts, the term bitmap implies one bit per pixel, whereas pixmap is used for images with multiple bits per pixel.[3][4]

A bitmap is a type of memory organization or image file format used to store digital images. The term bitmap comes from the computer programming terminology, meaning just a map of bits, a spatially mapped array of bits. Now, along with pixmap, it commonly refers to the similar concept of a spatially mapped array of pixels. Raster images in general may be referred to as bitmaps or pixmaps, whether synthetic or photographic, in files or memory.

Many graphical user interfaces use bitmaps in their built-in graphics subsystems.[5] For example, the Microsoft Windows and OS/2 platforms' GDI subsystem uses the Windows and OS/2 bitmap file format, usually named with the file extension .BMP (or .DIB for device-independent bitmap). Besides BMP, other file formats that store literal bitmaps include InterLeaved Bitmap (ILBM), Portable Bitmap (PBM), X Bitmap (XBM), and Wireless Application Protocol Bitmap (WBMP). Similarly, most other image file formats, such as JPEG, TIFF, PNG, and GIF, also store bitmap images (as opposed to vector graphics), but they are not usually referred to as bitmaps, since they use compressed formats internally.

Pixel storage

[edit]

In typical uncompressed bitmaps, image pixels are generally stored with a variable number of bits per pixel which identify its color (the color depth). Pixels of 8 bits and fewer can represent either grayscale or indexed color. An alpha channel (for transparency) may be stored in a separate bitmap, where it is similar to a grayscale bitmap, or in a fourth channel that, for example, converts 24-bit images to 32 bits per pixel.

The bits representing the bitmap pixels may be packed or unpacked (spaced out to byte or word boundaries), depending on the format or device requirements. Depending on the color depth, a pixel in the picture will occupy at least n/8 bytes, where n is the bit depth.

For an uncompressed, packed-within-rows bitmap, such as is stored in Microsoft DIB or BMP file format, or in uncompressed TIFF format, a lower bound on storage size for a n-bit-per-pixel (2n colors) bitmap, in bytes, can be calculated as:

where width and height are given in pixels.

In the formula above, header size and color palette size, if any, are not included. Due to effects of row padding to align each row start to a storage unit boundary, such as a word, additional bytes may be needed.

Device-independent bitmaps and BMP file format

[edit]

Microsoft has defined a particular representation of color bitmaps of different color depths, as an aid to exchanging bitmaps between devices and applications with a variety of internal representations. They called these device-independent bitmaps "DIBs", and the file format for them is called DIB file format or BMP file format. According to Microsoft support:[6]

A device-independent bitmap (DIB) is a format used to define device-independent bitmaps in various color resolutions. The main purpose of DIBs is to allow bitmaps to be moved from one device to another (hence, the device-independent part of the name). A DIB is an external format, in contrast to a device-dependent bitmap, which appears in the system as a bitmap object (created by an application...). A DIB is normally transported in metafiles (usually using the StretchDIBits() function), BMP files, and the Clipboard (CF_DIB data format).

Here, "device independent" refers to the format, or storage arrangement, and should not be confused with device-independent color.

Other bitmap file formats

[edit]

The X Window System uses a similar XBM format for black-and-white images, and XPM (pixelmap) for color images. Numerous other uncompressed bitmap file formats are in use, though most not widely.[7] For most purposes, standardized compressed bitmap files such as GIF, PNG, TIFF, and JPEG are used. Lossless compression in particular provides the same information as a bitmap in a smaller file size.[8] TIFF and JPEG have various options. JPEG is usually lossy compression. TIFF is usually either uncompressed, or lossless Lempel–Ziv–Welch compressed like GIF. PNG uses deflate lossless compression, another Lempel-Ziv variant.

There are also a variety of "raw" image files, which store raw bitmaps with no other information. Such raw files are just bitmaps in files, often with no header or size information (they are distinct from photographic raw image formats, which store raw unprocessed sensor data in a structured container such as TIFF format along with extensive image metadata).

See also

[edit]

References

[edit]
Revisions and contributorsEdit on WikipediaRead on Wikipedia
from Grokipedia
A bitmap is a representation composed of a rectangular grid of , where each is defined by a specific color value encoded using one or more bits, forming the basis of . This structure allows computers to store, process, and display visual information by mapping directly to screen elements or file formats. The key characteristics of bitmaps include their resolution, determined by the number of (width and height), and bit depth, which specifies the range of colors available—for instance, 1 bit per supports 2 colors (), 8 bits supports 256 colors, and 24 bits enables over 16 million colors through RGB components. Bitmaps may use a color palette for indexed formats or store color data directly, and they often include metadata such as dimensions and compression details. Unlike , which use mathematical equations for scalable shapes, bitmaps are fixed-resolution and can appear pixelated when enlarged, making them ideal for capturing photographic details but less suitable for resizing without quality loss. Common file formats for bitmaps include the BMP (Bitmap Image File) format, developed by in the late 1980s as a device-independent standard for storing uncompressed or run-length encoded raster images on Windows systems. Other widely used formats are for of photographs, for with transparency support, and TIFF for high-quality archival imaging, each balancing file size, quality, and functionality for applications like web display, , and . Bitmaps originated in early during the 1970s, with pioneering systems like PARC's using single-bit-per-pixel frame buffers to render simple displays, evolving from basic memory mapping to support complex color imaging in modern computing. Today, bitmaps underpin , video games, user interfaces, and scientific visualization, enabling precise pixel-level manipulation while posing challenges in storage due to their data-intensive nature.

Fundamentals

Definition and Characteristics

A bitmap is a type of raster image that represents digital visuals through a grid of discrete , where each pixel encodes a specific color or intensity value. This grid-based structure allows bitmaps to capture detailed visual information by assigning values to individual picture elements, forming the foundational method for storing and displaying computer-generated images. Key characteristics of bitmaps include their fixed resolution, defined by the number of pixels in width and height, which determines the image's detail level but limits . When enlarged beyond the original resolution, bitmaps exhibit , as the finite grid becomes visibly blocky without additional data to interpolate finer details. This makes bitmaps particularly suitable for complex, non-geometric images such as photographs, where they excel at rendering smooth gradients, textures, and natural variations in color and shading. In terminology, bitmaps fall under the broader category of , which encompass any pixel-array representations, though "bitmap" specifically emphasizes the bit-level encoding of pixel data. Unlike , which use mathematical descriptions for scalable rendering, bitmaps rely on this fixed pixel matrix, prioritizing fidelity to photographic realism over infinite resizing. For illustration, consider a simple 2x2 bitmap grid representing a basic pattern, where each cell denotes a 's color value:
Pixel (0,0)Pixel (0,1)
BlackWhite
Pixel (1,0)Pixel (1,1)
WhiteBlack
This grid forms a checkerboard-like , demonstrating how individual assignments collectively create the overall visual.

Pixels and Resolution

In a bitmap image, a serves as the smallest addressable element, forming a two-dimensional grid where each pixel is defined by its position in terms of row and column coordinates and by its value, which represents either a color or a intensity. This grid structure allows for precise mapping of visual data, with the pixel's value determining how it contributes to the overall appearance. Resolution in bitmaps is characterized by metrics such as the total pixel count, calculated as the product of the 's width and height in s, and the density measures of pixels per inch (PPI) or (DPI), which indicate how many pixels fit into a linear inch when the is displayed or printed. Higher PPI or DPI values enable greater detail in the rendered by packing more pixels into the same physical space, but bitmaps exhibit limited ; enlarging a low-resolution beyond its native pixel dimensions results in and loss of sharpness, as no additional detail can be interpolated without artifacts. The file size of an uncompressed bitmap is directly tied to its resolution, with the pixel data portion computed as the total number of pixels multiplied by the bytes required per pixel; for example, in an 8-bit grayscale image where each pixel uses 1 byte, the size equals width × height × 1 byte. Increasing resolution enhances visual fidelity by capturing finer details, but it proportionally escalates storage requirements—doubling both width and height quadruples the pixel count and thus the file size—and demands more computational resources for processing tasks like rendering or filtering, due to the larger dataset involved.

Storage Mechanisms

In-Memory Representation

In systems, bitmaps are typically stored in using a row-major order, where pixels are arranged sequentially by scanlines from top to bottom and left to right, forming a linear that facilitates efficient traversal during rendering. This layout aligns with the horizontal scanning pattern of display devices, allowing hardware and software to process entire rows contiguously for improved cache performance and reduced access latency. To optimize access and hardware compatibility, each scanline is often padded with extra bytes to ensure alignment to boundaries such as 4 or 32 bytes, preventing fragmentation and enabling faster SIMD operations or DMA transfers. The storage efficiency of bitmaps in depends on the bit depth, which determines how are packed into bytes. For 1-bit images, each bit represents a (e.g., 0 for , 1 for ), allowing 8 pixels per byte through bit packing. In 4-bit formats supporting 16 colors, two pixels are packed per byte, with each pixel using the upper and lower 4 bits. Similarly, 8-bit modes store one pixel per byte, referencing a palette of up to 256 entries. These packing schemes minimize usage for lower-depth images while requiring unpacking operations for access. Pixel values within these formats are interpreted via color encoding schemes like RGB or indexed palettes. A practical example of memory layout is a 640×480 bitmap at 24-bit depth (8 bits per RGB channel), which requires 640 × 480 × 3 = 921,600 bytes for the raw pixel data, excluding padding. With row padding to 4-byte alignment, each scanline of 640 pixels (1,920 bytes) remains unpadded since it is already a multiple of 4, but narrower images would add trailing bytes per row to meet the boundary. This results in a total allocation slightly larger than the raw size to accommodate alignment. Accessing pixels in this in-memory representation uses direct indexing, such as offset = y × (width × bytes_per_pixel + padding) + x × bytes_per_pixel, enabling constant-time retrieval for point operations like color sampling. In graphics APIs like or , this linear layout supports efficient texture uploads and fragment reads, where sequential scanline access boosts rendering throughput by leveraging GPU coalescing and minimizing bank conflicts.

Color Encoding

Color encoding in bitmaps refers to the methods used to represent the color or intensity of each within the . The choice of encoding determines the range of colors or shades that can be displayed and influences storage efficiency and rendering capabilities. Common approaches include indexed (palette-based) and direct color models, which vary in bit depth—the number of bits allocated per —to balance color fidelity with memory usage. Bit depth levels define the granularity of color representation in bitmaps. A 1-bit depth supports only two colors, typically black and white, where each is either on (1) or off (0), suitable for simple binary images like or text. An 8-bit depth allows for 256 distinct values, often used in paletted modes for limited color images or 256 in variants. At 24 bits per pixel, known as true color, each encodes approximately 16.7 million colors by allocating 8 bits each to , , and components in the RGB model. Extending to 32 bits adds an 8-bit alpha channel to the 24-bit RGB, enabling per- transparency levels from fully opaque to fully transparent. In palette-based encoding, also called , pixel values store indices rather than direct color data, referencing a separate color (CLUT) that maps each index to an actual color, typically in RGB format. This approach conserves space for images with few distinct colors; for instance, an 8-bit bitmap uses a 256-entry palette where each entry is a 24-bit RGB triplet, allowing efficient rendering by substituting indices with palette colors during display. The palette itself is stored alongside the pixel data, and its size matches the bit depth (e.g., 16 entries for 4-bit). This method was particularly prevalent in early and web to reduce file sizes without sacrificing visual quality in constrained environments. Direct color models store color components explicitly in each pixel without a palette, providing greater flexibility for high-fidelity images. The RGB model, the most common for , allocates bits directly to , , and primaries; for example, 8 bits per channel in a 24-bit bitmap yields 256 levels per primary, combining additively to form the full color spectrum. For print applications, the CMYK model uses subtractive primaries—, , , and —with similar bit allocations (e.g., 32 bits total for 8 bits each), absorbing light to produce colors on paper. variants simplify to a single channel, where bit depth determines shades of gray; an 8-bit bitmap supports 256 levels from to white, ideal for or scientific imaging. Transparency in bitmaps is handled through additional channels or to composite images over backgrounds. The alpha channel in a 32-bit ARGB format stores an opacity value (0-255) per , where 0 is fully transparent and 255 is opaque, allowing smooth blending via formulas like the standard equation. For simpler cases, a bitmask provides binary transparency, designating pixels as fully transparent or opaque based on a threshold color or separate mask bitmap, commonly used in legacy formats for cutouts or sprites.
Color DepthBits per PixelColor CountTypical UseEncoding Type
1-bit12Binary (B/W)
8-bit8256Paletted or Indexed or Single Channel
24-bit2416.7 millionTrue ColorDirect RGB
32-bit3216.7 million + AlphaTransparent True ColorDirect ARGB

File Formats

BMP and DIB Specifications

The BMP (Bitmap) file format is a format developed by in the 1980s to store device-independent 2D images, supporting uncompressed pixel data or (RLE) compression, with color depths ranging from 1 bit to 32 bits per . It is commonly used in Windows environments and allows images to be rendered consistently across different devices without relying on specific hardware capabilities. The BMP file structure begins with a 14-byte BITMAPFILEHEADER, which identifies the file type and provides metadata for locating the image data. This header includes the following fields: bfType (a 2-byte WORD set to 0x4D42 or "BM" to indicate a BMP file), bfSize (a 4-byte DWORD specifying the total in bytes), bfReserved1 and bfReserved2 (2-byte WORDs set to zero for reserved purposes), and bfOffBits (a 4-byte DWORD giving the byte offset from the start of the file to the ). Following this is a 40-byte BITMAPINFOHEADER (for Windows variants), which describes the image dimensions and format: biSize (4-byte DWORD, set to 40), biWidth (4-byte LONG for width), biHeight (4-byte LONG for height, positive for bottom-up orientation), biPlanes (2-byte WORD, always 1), biBitCount (2-byte WORD for bits per , e.g., 24 for true color), biCompression (4-byte DWORD, such as 0 for BI_RGB uncompressed or 1 for BI_RLE8), biSizeImage (4-byte DWORD for compressed image size or 0 for uncompressed), biXPelsPerMeter and biYPelsPerMeter (4-byte LONGs for resolution), biClrUsed (4-byte DWORD for colors in the palette, or 0 for default), and biClrImportant (4-byte DWORD for important colors, or 0 for all). After the headers, an optional color table ( of RGBQUAD structures for indexed colors) precedes the data, which is stored row by row with each row padded to a multiple of 4 bytes for alignment. At its core, the BMP format relies on the Device-Independent Bitmap (DIB), which encapsulates the image data and metadata in a way that enables platform-independent rendering. DIBs can use a color table for palettized images (e.g., 8-bit with 256 entries) or direct RGB values for higher depths like 24-bit or 32-bit, allowing the operating system to map colors to the without hardware-specific adjustments. This structure supports rendering via the Windows (GDI), where the DIB section follows the info header and provides the raw . BMP variants include the Windows format (version 3 and later, using the 40-byte BITMAPINFOHEADER) and the earlier format (using a 12-byte BITMAPCOREHEADER for basic compatibility). Later extensions like BITMAPV4HEADER and BITMAPV5HEADER add support for features such as alpha channels in 32-bit images (though legacy applications may ignore them). A key limitation is the lack of standard transparency support, as BMP does not natively handle alpha blending outside of specific 32-bit variants, and compression is restricted to simple RLE methods for 4-bit and 8-bit images without advanced options like . For example, in an uncompressed 24-bit BMP image measuring 100 wide by 100 high, each row requires 100 × 3 = 300 bytes (no needed, as 300 is a multiple of 4), yielding 100 × 300 = 30,000 bytes for the . With the 14-byte BITMAPFILEHEADER and 40-byte BITMAPINFOHEADER (no color table required for 24-bit), the bfOffBits would be 54, and the total file size (bfSize) would be 30,054 bytes.

Alternative Raster Formats

The Graphics Interchange Format (), introduced by in 1987, is an 8-bit paletted raster format that supports up to 256 colors per image and uses () lossless compression to reduce file sizes. It gained popularity for web graphics due to its ability to handle simple animations through frame sequencing and transparency via a single-color index, making it suitable for icons, logos, and short looping sequences despite its limited . The (JFIF), standardized in 1992, employs based on the (DCT) to efficiently store photographic images in 24-bit color depth. This approach discards less perceptible details to achieve significantly smaller file sizes compared to uncompressed formats like BMP, rendering it ideal for web distribution and storage of continuous-tone images such as photographs, though it introduces artifacts at high compression levels. Developed in 1996 as a patent-free alternative to GIF, the Portable Network Graphics (PNG) format provides using the algorithm, supporting up to 48-bit truecolor and an optional alpha channel for variable transparency. Its extensibility and support for progressive loading make it versatile for web and print applications requiring high fidelity, including illustrations and images with smooth gradients or semi-transparency. The Tagged Image File Format (TIFF), first specified by in 1986, offers a highly flexible structure for professional imaging, accommodating multiple pages within a single file and various compression options such as LZW (lossless) and (lossy). Widely adopted in and scanning workflows since the 1980s, it supports extensive metadata tagging and high bit depths, enabling archival-quality storage for documents and multi-layer scans.
FormatCompression TypeColor SupportTransparency Support
GIFLossless (LZW)8-bit paletted (up to 256 colors)Single-color index
JPEGLossy (DCT)24-bit RGBNone (JFIF baseline)
Lossless ()Up to 48-bit truecolor + 16-bit alphaFull alpha channel
TIFFVariable (LZW, JPEG, etc.)Up to 32-bit per channelVia alpha or masks

Historical Context

Origins in Computing

The origins of bitmaps in trace back to the 1960s, when early systems began leveraging cathode-ray tube (CRT) displays and plotters to render visual data. These devices primarily used vector-based approaches, drawing lines and shapes directly, but conceptual foundations for —representing images as grids of —emerged during this period. Ivan Sutherland's system, demonstrated in 1963, pioneered interactive on a CRT display, allowing users to create and manipulate line drawings in real time, which influenced subsequent pixel-grid representations in graphics. Concurrently, at , Ken Knowlton's BEFLIX programming language, developed in 1963, enabled the creation of bitmap-based animated films by generating raster mosaic graphics on a Stromberg-Carlson SC-4020 microfilm , marking one of the earliest uses of pixel arrays for synthesis. In the , bitmap technology advanced significantly with the integration of memory-mapped displays, allowing direct manipulation of pixel data in RAM. The , developed at PARC in 1973, featured the first high-resolution bitmap display (606 × 808 pixels) for a (GUI), storing the entire screen as an array of pixels to support windows, icons, and interactive editing. This innovation, combined with a for input, demonstrated bitmaps' potential for dynamic, device-independent graphics rendering, influencing future personal computing systems. The 1980s saw widespread adoption of bitmapped graphics in consumer operating systems, driven by the need for precise, scalable visual interfaces. Apple's Macintosh, released in 1984, popularized bitmap displays with its 512x342 monochrome screen and graphics library, which handled pixel-level operations to enable what-you-see-is-what-you-get () editing in applications like . This approach made bitmaps accessible to non-experts, fostering the growth of and graphical software. A key milestone came in 1990 with Microsoft's introduction of the file format alongside , which formalized the storage of data in a device-independent manner. Building on the Device Independent Bitmap (DIB) specification originally developed for OS/2's Presentation Manager in the late , BMP allowed images to be rendered consistently across different hardware, supporting color depths up to 24 bits per and establishing a standard for raster image interchange in Windows environments.

Standardization and Evolution

The standardization of key bitmap formats advanced through international bodies in the 1990s and early 2000s, establishing interoperable specifications for raster image compression and storage. The (JPEG) format was formalized as ITU-T Recommendation T.81 in September 1992, defining a algorithm optimized for continuous-tone photographic images, which became foundational for and . In response to patent concerns with earlier formats like GIF, the (PNG) format was developed as a lossless alternative and ratified as ISO/IEC 15948:2004, supporting features such as alpha transparency and progressive loading for web and print applications. Operating system vendors also drove bitmap evolution by extending native formats to meet growing demands for and compatibility. Microsoft introduced BMP version 5 with in 1998, adding support for International Color Consortium (ICC) profiles, 16-bit color depths, and alpha channel transparency to enhance cross-device rendering and integration with advanced graphics APIs. Similarly, Apple shifted macOS from the legacy QuickDraw-based PICT format—used for mixed vector and bitmap graphics in —to the imaging model in Mac OS X (2001), which adopts PDF as its core representation, thereby minimizing reliance on pure bitmap structures in favor of resolution-independent rendering. The (W3C) influenced bitmap adoption through HTML specifications in the 1990s, recommending raster formats for inline image embedding to enable rich web content. Early HTML drafts from 1993 supported GIF and , but by 1996, the W3C elevated to Recommendation status, promoting its use for lossless images with transparency, which spurred browser implementations and widespread deployment of for photos and for graphics across web platforms. In recent decades, bitmap technology has progressed toward high-fidelity and performance-oriented capabilities. The format, developed by in 1999 for (HDR) imaging in , supports multi-channel floating-point data to capture extended ranges beyond standard 8-bit bitmaps, and was open-sourced in 2003 for broader industry use. Concurrently, the 2000s saw GPU acceleration transform bitmap processing, with programmable shaders in cards like NVIDIA's GeForce 3 (2001) enabling parallel raster operations such as convolution filters and resizing, further boosted by general-purpose frameworks like in 2006 for real-time image manipulation in applications from gaming to scientific visualization.

Applications and Techniques

Usage in Graphics Systems

In graphics systems, bitmaps serve as fundamental components in rendering pipelines, particularly as framebuffers within processing units (GPUs). A framebuffer is a portion of GPU that stores a complete bitmap representing the pixels of a rendered frame, enabling efficient composition and output to displays. In GPU pipelines, such as those in , framebuffers are managed through Framebuffer Objects (FBOs), where bitmaps—often attached as textures or renderbuffers—are targeted for rendering operations like drawing primitives or applying shaders. This setup allows for off-screen rendering, where bitmaps accumulate scene data before final presentation, supporting advanced techniques like post-processing effects. Blitting operations further integrate bitmaps into display workflows by copying rectangular regions of from a source to a destination, such as the screen buffer. In , blitting is performed via glBlitFramebuffer, which transfers between read and draw framebuffers while optionally applying scaling filters to handle resolution differences. This process is essential for efficient screen updates in real-time applications, minimizing redundant computations by directly manipulating bitmap regions without full re-rendering. Bitmap editing software relies on layer-based manipulation to enable non-destructive raster operations on pixel data. In , raster layers store bitmap content for pixel-level editing, allowing users to apply tools like brushes, filters, and adjustments while preserving underlying layers through stacking and opacity controls. in Photoshop smooths jagged edges on bitmap selections or shapes by blending edge pixels with surrounding colors, reducing artifacts during scaling or masking. Similarly, supports layer-based bitmap editing by creating new layers for isolated manipulations, such as duplicating existing ones or pasting content, which facilitates and iterative refinements without altering the base image. Operating systems integrate bitmaps for elements like icons and wallpapers, often requiring scaling to adapt to varying display resolutions. In Windows, icons are stored in .ico files containing multiple bitmap sizes (e.g., 16x16 to 256x256 pixels) with alpha channels for transparency, and scaling employs methods like bicubic resizing to maintain clarity on high-DPI screens. Wallpapers in Windows are typically raster images in formats like BMP, scaled via to fit desktop resolutions without distortion. In macOS, icons and wallpapers use bitmap-based representations, with the system applying for HiDPI scaling to ensure smooth rendering across displays. Programming APIs leverage bitmaps as textures for surface detailing in , enhanced by to manage resolution transitions. In , bitmaps are loaded as 2D textures and mapped to using UV coordinates, where the fragment samples colors to apply surface details. generates a series of progressively smaller bitmap versions (e.g., halving dimensions per level), allowing to select appropriate resolutions based on object distance, with functions like glGenerateMipmap automating the chain and filters like GL_LINEAR_MIPMAP_LINEAR blending for seamless quality. similarly treats bitmaps as textures, creating chains (e.g., 256x256 down to 16x16) via CreateTexture to optimize rendering performance and reduce on distant surfaces, with sampler states controlling between levels.

Compression Methods

Bitmap compression methods aim to reduce the storage requirements of raster images by exploiting redundancies in data, either preserving the exact original information or approximating it to achieve greater size reductions. These techniques are essential for efficient handling of bitmaps in storage and transmission, balancing file size against data fidelity. ensures that the decompressed image is identical to the original, making it suitable for applications requiring pixel-perfect accuracy, such as graphics editing. In the BMP format, (RLE) is employed for images with 4 or 8 bits per pixel, where sequences of identical s are replaced by a count and the pixel value to eliminate repetition. For broader raster support, the format uses , which combines LZ77 dictionary-based compression with to predict and encode patterns without data loss. Lossy compression discards less perceptible details to achieve significantly smaller file sizes, often at the cost of introducing visible artifacts, and is commonly used for photographic bitmaps where minor quality loss is acceptable. The JPEG standard applies the (DCT) to 8x8 pixel blocks to convert spatial data into frequency coefficients, followed by quantization that divides these coefficients by a scaling matrix to round off less significant values, enabling tunable quality levels via compression ratios. Other specialized methods include , which represents images as iterated function systems approximating self-similar patterns in natural scenes, though it remains rare due to high computational demands during encoding. transforms, as in the standard, decompose images into multi-resolution bands for more efficient encoding, supporting both lossless and lossy modes with reduced artifacts compared to DCT-based approaches. The primary trade-off between lossless and lossy methods lies in efficiency versus fidelity: lossless techniques like RLE and maintain exact data but yield modest compression ratios, often 2:1 to 3:1 for typical bitmaps, while lossy approaches like can achieve 10:1 or higher ratios at the expense of irreversible artifacts such as blocking or blurring.

References

Add your contribution
Related Hubs
Contribute something
User Avatar
No comments yet.