Image MIME Reference
Generic-RAW
Digital Camera Raw (Generic Linux MIME)
image/x-dcraw
VS
Khronos Texture
image/ktx
KTX
A complete technical comparison of Digital Camera Raw (Generic Linux MIME) and Khronos Texture — covering compression, feature support, browser compatibility, magic bytes, and when to choose each format.
Equal browser support
Feature Support
| Feature | Generic-RAW | KTX |
|---|---|---|
| Transparency (Alpha) | ✕ No | Yes |
| Animation Support | ✕ No | ✕ No |
| Progressive Loading | ✕ No | ✕ No |
| HDR Support | Yes | Yes |
| EXIF Metadata | Yes | ✕ No |
| ICC Color Profile | Yes | ✕ No |
Digital Camera Raw (Generic Linux MIME)
image/x-dcraw
Extension
.raw
Container
Varies (Predominantly TIFF/EP)
Compression
Lossless / Uncompressed
Algorithm
Varies (Often Lossless JPEG ITU-T81 or uncompressed)
Color Depth
12-bit, 14-bit, 16-bit
Developed by
freedesktop.org (MIME mapping) / Dave Coffin (dcraw tool)
Released
1997
Magic Bytes
Varies by vendor format
Khronos Texture
image/ktx
Extension
.ktx
Container
KTX (Khronos Texture 1.1)
Compression
Uncompressed / GPU Compressed (ASTC, ETC, BCn, PVRTC)
Algorithm
ASTCETC1 / ETC2BCn (DXT)PVRTCBasis Universal (in KTX2)
Color Depth
8-bit, 16-bit, 32-bit (Integer/Float)
Developed by
Khronos Group
Released
2010
Magic Bytes
AB 4B 54 58 20 31 31 BB 0D 0A 1A 0A
Browser Support Comparison
| Browser | Generic-RAW | KTX |
|---|---|---|
|
|
✕ | ✕ |
|
|
✕ | ✕ |
|
|
✕ | ✕ |
|
|
✕ | ✕ |
|
|
✕ | ✕ |
Generic-RAW
Generic-RAW Strengths
- Provides a unified, highly useful catch-all MIME type for application developers who just need to know if a file is a raw image, rather than tracking 50+ individual camera extensions
- Deeply integrated into the Linux desktop ecosystem, ensuring file manager thumbnails work seamlessly via tools like ufraw-thumbnailer
Limitations
- Not an official IANA standard
- Can cause conflicts where standard TIFF files are misidentified as raw camera data by over-aggressive MIME sniffers
- The underlying 'dcraw' tool was abandoned by its creator in 2018 (though its successor, LibRaw, continues to maintain the ecosystem)
KTX
KTX Strengths
- Enables direct-to-GPU texture uploading, drastically reducing load times and CPU overhead in 3D applications
- Supports complex texture types natively (mipmaps, cubemaps, 3D volumes, texture arrays)
- Standardized across major Khronos APIs (OpenGL, Vulkan, WebGL) unlike vendor-specific formats like DDS
Limitations
- Requires custom JavaScript loaders to parse and display on the web
- Zero native support in consumer image viewers or 2D photo editing software
- Format fragmentation: a KTX file containing an ASTC payload will fail to render on hardware that only supports BCn compression (KTX2 and Basis Universal solve this)
When to choose which format
Generic-RAW
Use Generic-RAW when…
- Linux Desktop File Associations (GNOME/KDE)
- Thumbnail Generation for Raw Images (UFRaw/LibRaw)
- Server-side Image Processing Fallbacks
KTX
Use KTX when…
- Real-time 3D Graphics
- WebGL / WebGPU Applications
- Mobile Games
- Virtual/Augmented Reality (VR/AR)