{"success":true,"data":{"ext":"dib","name":"Windows","description":"Device-independent bitmap (DIB) is a raster image format developed by Microsoft for the Windows operating system and maintained as part of the Windows graphics ecosystem. It is used for storing and exchanging bitmap images in applications that support Windows imaging, including editors, viewers, and software components that handle clipboard or icon data. DIB is a legacy format with limited compression and metadata support, but it is generally safe when opened in standard image software.","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"}]}],"related":["bmp","ico","avif","cr2","cr3","exr"],"usage":{"python":"def is_dib(file_path: str) -> bool:\n    \"\"\"Check if file is a valid DIB by magic bytes.\"\"\"\n    signature = bytes([0x42, 0x4D])\n    with open(file_path, \"rb\") as f:\n        return f.read(2) == signature","node":"function isDIB(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x42, 0x4D]);\n  return buffer.subarray(0, 2).equals(signature);\n}","go":"func IsDIB(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"}}