Generated by GPT-5-miniBMP The BMP format is a raster file format introduced by Microsoft and used across Windows platforms for storing bitmap digital images. Originating in the early development of Windows 1.0 and later standardized in OS/2 and Windows NT families, the format became ubiquitous for simple, uncompressed image interchange between Paintbrush (Windows), GDI-based applications, and graphics utilities. BMP files are notable for straightforward headers, support for multiple color depths, optional compression, and wide compatibility with image editors such as Microsoft Paint, Adobe Photoshop, and GIMP.
BMP emerged during the creation of Windows 1.0 and the Graphics Device Interface (GDI) at Microsoft to represent device-independent bitmaps for on-screen rendering and printing. Early implementations coincided with the development of OS/2 by IBM and Microsoft, and BMP became a documented component of the Windows API and OS/2 Presentation Manager. Over successive Windows NT and Windows 95 releases, the header structures evolved (for example, from the original BITMAPCOREHEADER to BITMAPINFOHEADER and later BITMAPV5HEADER) to accommodate color management used by ICC profile workflows, alpha blending in Windows 2000, and higher bit depths needed by professional graphics packages like Adobe Photoshop. Third-party graphics libraries such as libpng and ImageMagick included BMP readers to ensure interoperability with Microsoft Paint output and scanned images produced by devices from vendors including Canon, Epson, and HP.
A BMP file typically contains a BITMAPFILEHEADER followed by a DIB header (e.g., BITMAPINFOHEADER, BITMAPV4HEADER, BITMAPV5HEADER), a color table for paletted images, and pixel array data. The DIB headers record dimensions, color depth (1, 4, 8, 16, 24, 32 bits per pixel), compression method (BI_RGB, BI_RLE8, BI_RLE4, BI_BITFIELDS, BI_JPEG, BI_PNG), and optionally color profile references for sRGB or ICC-based color management. Pixel data alignment requirements impose 4-byte row padding, and row order can be bottom-up or top-down depending on the height sign in the header. Support for alpha channels and color masks was extended in BITMAPV3/V4/V5 headers to interoperate with Direct2D rendering and Windows Presentation Foundation pipelines. The straightforward header layout aids low-level parsing in libraries like GDI+ and DirectDraw-based software.
BMP variants include older OS/2 BMPs using BITMAPCOREHEADER, standard Windows BMPs using BITMAPINFOHEADER, and extended variants with BITMAPV4HEADER and BITMAPV5HEADER that add color profiles and alpha channel support. Some BMP files embed compressed data using run-length encoding (RLE) compatible with Windows NT 3.1 conventions, while later extensions allowed embedding of JPEG or PNG streams inside BI_JPEG or BI_PNG blocks for lossy or lossless compression. Device-specific variations arose in scanner and camera outputs from vendors such as Kodak and Sony, producing proprietary DIB headers or nonstandard color tables. The format’s simplicity led to many unofficial variants implemented in toolchains like Netpbm, libbmp-derived utilities, and image viewers such as IrfanView.
Native BMP support exists in Microsoft Paint, Windows Photo Viewer, Windows Explorer, and the GDI API. Cross-platform libraries and applications offering BMP read/write include ImageMagick, GIMP, GraphicsMagick, libvips, and FFmpeg for frame export. Programming frameworks such as .NET Framework, Qt, GTK+, and wxWidgets provide built-in BMP loaders and savers. Graphics drivers and scanner software from Epson, HP, and Fujifilm often generate BMP output for compatibility. Open-source toolchains like Netpbm and libbmp have historically provided utilities for conversion to and from PNG, JPEG, TIFF, and GIF formats.
BMP has been used for simple icon and cursor artwork in Windows Shell themes, raw image capture from legacy scanners, frame buffers in early computer graphics education, and intermediate images in image-processing pipelines within MATLAB and LabVIEW projects. Its uncompressed nature made BMP suitable for lossless storage of screenshots, archival of unedited scans in photogrammetry workflows, and exchange between Windows applications when color fidelity without compression artifacts was required. BMP also appeared in early web graphics and user interface assets for applications like Internet Explorer toolbars, and as simple test patterns in standards work by organizations such as ISO and IEC for raster interchange proofs.
Critics point to BMP’s inefficient storage due to lack of built-in lossy compression compared with JPEG and less sophisticated lossless compression than PNG, resulting in large file sizes for photographs and high-resolution images. The multiplicity of header variants and vendor-specific deviations led to interoperability issues among image editors and device drivers. Security analyses revealed that malformed headers in BMPs could trigger vulnerabilities in parsers of Microsoft Windows components and third-party viewers, prompting updates in CVE advisories and mitigations in Windows Update cycles. BMP’s limited metadata support compared with TIFF and JPEG EXIF reduced its suitability for modern digital photography workflows used by organizations like Adobe and Apple.
Category:Image file formats