Silicon Graphics RGB Bitmap (.rgb)
.rgb file signature | image/x-rgb
Silicon Graphics RGB Bitmap
Magic Bytes
Offset 0
01 DA 01 01 00 03
Sources: Apache Tika, Gary Kessler
Extension
.rgb
MIME Type
image/x-rgb
Byte Offset
0
Risk Level
Safe
Validation Code
How to validate .rgb files in Python
def is_rgb(file_path: str) -> bool:
"""Check if file is a valid RGB by magic bytes."""
signature = bytes([0x01, 0xDA, 0x01, 0x01, 0x00, 0x03])
with open(file_path, "rb") as f:
return f.read(6) == signature
How to validate .rgb files in Node.js
function isRGB(buffer: Buffer): boolean {
const signature = Buffer.from([0x01, 0xDA, 0x01, 0x01, 0x00, 0x03]);
return buffer.subarray(0, 6).equals(signature);
}
How to validate .rgb files in Go
func IsRGB(data []byte) bool {
signature := []byte{0x01, 0xDA, 0x01, 0x01, 0x00, 0x03}
if len(data) < 6 {
return false
}
return bytes.Equal(data[:6], signature)
}
API Endpoint
/api/v1/rgb
curl https://filesignature.org/api/v1/rgb
See the full API documentation for all endpoints and parameters.
Frequently Asked Questions
What is a .rgb file?
A .rgb file is a Silicon Graphics RGB Bitmap file. Silicon Graphics RGB Bitmap
What are the magic bytes for .rgb files?
The magic bytes for Silicon Graphics RGB Bitmap files are 01 DA 01 01 00 03 at byte offset 0. These bytes uniquely identify the file format regardless of the file extension.
How do I validate a .rgb file?
To validate a .rgb file, read the first bytes of the file and compare them against the known magic bytes (01 DA 01 01 00 03) at offset 0. This is more reliable than checking the file extension alone, as extensions can be renamed.
What is the MIME type for .rgb files?
The primary MIME type for .rgb files is image/x-rgb.
Is it safe to open .rgb files?
Silicon Graphics RGB Bitmap (.rgb) 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.