Radiance High Dynamic Range image file (.hdr)
.hdr file signature | image/vnd.radiance
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.
Magic Bytes
Offset 0
23 3F 52 41 44 49 41 4E 43 45 0A
Sources: Wikipedia, Gary Kessler
All Known Signatures
3 signature variants are documented for .hdr files across multiple sources.
| Hex Signature | Offset | Sources |
|---|---|---|
| 23 3F 52 41 44 49 41 4E 43 45 0A | 0 | Wikipedia, Gary Kessler |
| 6E 69 31 00 | 344 | Wikipedia |
| 49 53 63 28 | 0 | Gary Kessler |
Extension
.hdr
MIME Type
image/vnd.radiance
Byte Offset
0
Risk Level
Safe
Validation Code
How to validate .hdr files in Python
def is_hdr(file_path: str) -> bool:
"""Check if file is a valid HDR by magic bytes."""
signature = bytes([0x23, 0x3F, 0x52, 0x41, 0x44, 0x49, 0x41, 0x4E, 0x43, 0x45, 0x0A])
with open(file_path, "rb") as f:
return f.read(11) == signature
How to validate .hdr files in Node.js
function isHDR(buffer: Buffer): boolean {
const signature = Buffer.from([0x23, 0x3F, 0x52, 0x41, 0x44, 0x49, 0x41, 0x4E, 0x43, 0x45, 0x0A]);
return buffer.subarray(0, 11).equals(signature);
}
How to validate .hdr files in Go
func IsHDR(data []byte) bool {
signature := []byte{0x23, 0x3F, 0x52, 0x41, 0x44, 0x49, 0x41, 0x4E, 0x43, 0x45, 0x0A}
if len(data) < 11 {
return false
}
return bytes.Equal(data[:11], signature)
}
API Endpoint
/api/v1/hdr
curl https://filesignature.org/api/v1/hdr
See the full API documentation for all endpoints and parameters.
Frequently Asked Questions
What is a .hdr file?
A .hdr file is a Radiance High Dynamic Range image file file. 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.
What are the magic bytes for .hdr files?
The magic bytes for Radiance High Dynamic Range image file files are 23 3F 52 41 44 49 41 4E 43 45 0A at byte offset 0. These bytes uniquely identify the file format regardless of the file extension.
How do I validate a .hdr file?
To validate a .hdr file, read the first bytes of the file and compare them against the known magic bytes (23 3F 52 41 44 49 41 4E 43 45 0A) at offset 0. This is more reliable than checking the file extension alone, as extensions can be renamed.
What is the MIME type for .hdr files?
The primary MIME type for .hdr files is image/vnd.radiance.
Is it safe to open .hdr files?
Radiance High Dynamic Range image file (.hdr) files are generally safe to open. They are classified as low risk because they primarily contain data rather than executable code. However, always ensure files come from a trusted source.