{"success":true,"data":{"ext":"bmp","name":"Windows","description":"Windows Bitmap (BMP) is an image file format developed by Microsoft for storing device-independent raster graphics. It is commonly used for simple images, screenshots, icons, and graphics in Windows applications and system components. The format is longstanding and still supported, but because it is often uncompressed and a legacy format, BMP files can be large and should still be opened from trusted sources.","mime":["image/bmp"],"risk_level":"Safe","signatures":[{"hex":"42 4D","offset":0,"sources":[{"name":"Apache Tika","url":"https://raw.githubusercontent.com/apache/tika/main/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml"},{"name":"Wikipedia","url":"https://en.wikipedia.org/wiki/List_of_file_signatures"},{"name":"Gary Kessler","url":"https://www.garykessler.net/library/file_sigs_GCK_latest.html"},{"name":"Neil Harvey FileSignatures","url":"https://raw.githubusercontent.com/neilharvey/FileSignatures/master/src/FileSignatures/Formats/Bmp.cs"}]}],"related":["dib","ico","avif","cr2","cr3","exr"],"usage":{"python":"def is_bmp(file_path: str) -> bool:\n    \"\"\"Check if file is a valid BMP by magic bytes.\"\"\"\n    signature = bytes([0x42, 0x4D])\n    with open(file_path, \"rb\") as f:\n        return f.read(2) == signature","node":"function isBMP(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x42, 0x4D]);\n  return buffer.subarray(0, 2).equals(signature);\n}","go":"func IsBMP(data []byte) bool {\n    signature := []byte{0x42, 0x4D}\n    if len(data) < 2 {\n        return false\n    }\n    return bytes.Equal(data[:2], signature)\n}"},"category":"Images"}}