{"id":"image-x-windows-bmp","mimeType":"image/x-windows-bmp","name":"Windows Bitmap (Legacy Windows MIME Alias)","shortName":"BMP","category":"Raster Graphics","extensions":[".bmp",".dib"],"description":"The image/x-windows-bmp MIME type is another legacy, vendor-specific alias for the Windows Bitmap (BMP) format. Highly similar to 'image/x-ms-bmp' and 'image/x-win-bmp', this variant was frequently utilized by older Windows desktop applications, legacy web servers, and MIME configuration tables to identify uncompressed Device-Independent Bitmaps (DIB). The underlying file is structurally identical to standard BMP files, featuring the classic 'BM' magic header and storing uncompressed, lossless pixel data.","seo":{"title":"image/x-windows-bmp MIME Type | Developer Reference for Windows Bitmap","description":"Complete reference for the image/x-windows-bmp MIME type: Windows Bitmap format, DIB files, uncompressed raster graphics, and legacy MIME normalization.","faqs":[{"question":"What is the difference between image/x-windows-bmp and image/bmp?","answer":"There is no difference in the actual image file. 'image/bmp' is the official IANA standard. 'image/x-windows-bmp' is an older vendor alias historically assigned by specific Windows environments or legacy application registries when handling .bmp files."},{"question":"How should I handle image/x-windows-bmp in backend file uploads?","answer":"When accepting file uploads, if your server encounters legacy strings like 'image/x-windows-bmp', 'image/x-ms-bmp', or 'image/x-win-bmp', you should write normalization logic to map them to the standard 'image/bmp' format in your application database."},{"question":"Should I serve BMP files on modern websites?","answer":"No. While modern web browsers support rendering BMP files, their massive, uncompressed file sizes lead to poor page performance. You should convert them to WebP, AVIF, or PNG before web deployment."}]},"index":{"compression":["Uncompressed","Run-Length Encoding (RLE)"],"browserSupport":{"score":5,"label":"Excellent"},"commonUses":["Legacy Windows Desktop Registry Associations","Older Enterprise Intranet Applications","Windows Graphics Archival"]},"technical":{"magicBytes":{"hex":"42 4D","ascii":"BM"},"container":"DIB (Device-Independent Bitmap)","compressionAlgorithm":["None","RLE4","RLE8"],"colorDepth":["1-bit (Monochrome)","4-bit (16 colors)","8-bit (256 colors)","16-bit (High Color)","24-bit (True Color)","32-bit (True Color with Alpha)"],"transparency":true,"animation":false,"metadata":{"exif":false,"xmp":false,"iccProfile":true},"alphaChannel":true,"progressiveLoading":false,"hdrSupport":false},"history":{"developer":"Microsoft Corporation","released":"1985","specification":"Microsoft Windows Bitmap Structure Documentation"},"browserSupport":{"chrome":true,"chromeVersion":"1","firefox":true,"firefoxVersion":"1","safari":true,"safariVersion":"1","edge":true,"edgeVersion":"12","internetExplorer":true},"softwareSupport":[{"name":"Microsoft Paint","logo":""},{"name":"Adobe Photoshop","logo":""},{"name":"GIMP","logo":"gimp.svg"},{"name":"ImageMagick","logo":"image-magic.webp"}],"conversion":{"convertTo":["png","jpeg","webp","tiff"],"convertFrom":["png","jpeg","gif"]},"developer":{"httpHeaders":[{"header":"Content-Type","value":"image/bmp"},{"header":"Content-Type","value":"image/x-windows-bmp"}],"htmlAccept":"image/bmp, image/x-windows-bmp, .bmp","fileDetection":["Check the first two bytes of the file for the ASCII string 'BM' (Hex: 42 4D). This is the definitive signature for a Windows Bitmap.","The 'image/x-windows-bmp' string exists purely on the protocol/MIME layer and does not alter the underlying binary structure of the file."]},"prosCons":{"pros":["Universally supported by all major operating systems and modern web browsers","Maintains perfect, lossless fidelity because pixel data is stored without lossy compression artifacts"],"cons":["Massive file size overhead due to a lack of modern compression algorithms","Legacy MIME strings like 'image/x-windows-bmp' can trigger validation warnings in strict security or API environments if unhandled"]},"specifications":{"url":"https://learn.microsoft.com/en-us/windows/win32/gdi/bitmap-storage","rfc":"","mimeAliases":["image/bmp","image/x-ms-bmp","image/x-win-bmp","image/x-bmp"]},"developerSnippets":{"python":"import magic\n# Modern Libmagic resolves BMP files to the standard 'image/bmp'\nprint(magic.from_file('image.bmp', mime=True)) # Outputs 'image/bmp'","nodejs":"const mime = require('mime');\nconsole.log(mime.getType('image.bmp')); // Outputs 'image/bmp'","go":"import (\n    \"bytes\"\n    \"net/http\"\n)\n// Native Go HTTP detection reads the 'BM' header and returns 'image/bmp'","php":"// Example of normalizing legacy MIME types during file uploads\n$mime = $_FILES['upload']['type'];\nif (in_array($mime, ['image/x-windows-bmp', 'image/x-win-bmp', 'image/x-ms-bmp'])) {\n    $mime = 'image/bmp';\n}\necho $mime;"},"relatedFormats":["bmp","png","tiff"]}
