{"success":true,"data":{"ext":"hdr","name":"Radiance High Dynamic Range image file","description":"Radiance High Dynamic Range image (HDR) is an image file format developed for the Radiance lighting simulation system by Greg Ward and maintained through the Radiance project. It is used to store high-dynamic-range images for lighting analysis, computer graphics, rendering, and photographic workflows that require wide luminance values. The format is generally safe to open, though, like other image files, malformed files can sometimes expose vulnerabilities in viewing software.","mime":["image/vnd.radiance"],"risk_level":"Safe","signatures":[{"hex":"23 3F 52 41 44 49 41 4E 43 45 0A","offset":0,"sources":[{"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"}]},{"hex":"6E 69 31 00","offset":344,"sources":[{"name":"Wikipedia","url":"https://en.wikipedia.org/wiki/List_of_file_signatures"}]},{"hex":"49 53 63 28","offset":0,"sources":[{"name":"Gary Kessler","url":"https://www.garykessler.net/library/file_sigs_GCK_latest.html"}]}],"related":[],"usage":{"python":"def is_hdr(file_path: str) -> bool:\n    \"\"\"Check if file is a valid HDR by magic bytes.\"\"\"\n    signature = bytes([0x23, 0x3F, 0x52, 0x41, 0x44, 0x49, 0x41, 0x4E, 0x43, 0x45, 0x0A])\n    with open(file_path, \"rb\") as f:\n        return f.read(11) == signature","node":"function isHDR(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x23, 0x3F, 0x52, 0x41, 0x44, 0x49, 0x41, 0x4E, 0x43, 0x45, 0x0A]);\n  return buffer.subarray(0, 11).equals(signature);\n}","go":"func IsHDR(data []byte) bool {\n    signature := []byte{0x23, 0x3F, 0x52, 0x41, 0x44, 0x49, 0x41, 0x4E, 0x43, 0x45, 0x0A}\n    if len(data) < 11 {\n        return false\n    }\n    return bytes.Equal(data[:11], signature)\n}"},"category":"Images"}}