Image MIME Reference
HEJ2K
JPEG 2000 Image (HEIF Container)
image/hej2k
VS
Khronos Texture 2.0
image/ktx2
KTX2
A complete technical comparison of JPEG 2000 Image (HEIF Container) and Khronos Texture 2.0 — covering compression, feature support, browser compatibility, magic bytes, and when to choose each format.
Equal browser support
Feature Support
| Feature | HEJ2K | KTX2 |
|---|---|---|
| Transparency (Alpha) | Yes | Yes |
| Animation Support | ✕ No | ✕ No |
| Progressive Loading | Yes | ✕ No |
| HDR Support | Yes | Yes |
| EXIF Metadata | Yes | ✕ No |
| ICC Color Profile | Yes | ✕ No |
JPEG 2000 Image (HEIF Container)
image/hej2k
Extension
.hej2
Container
HEIF / ISOBMFF (ISO/IEC 15444-16)
Compression
Lossy / Lossless
Algorithm
JPEG 2000HTJ2K
Color Depth
8-bit, 10-bit, 12-bit, 16-bit
Developed by
ISO/IEC JTC 1 / ITU-T
Released
2019
Magic Bytes
XX XX XX XX 66 74 79 70 6A 32 6B 69
Khronos Texture 2.0
image/ktx2
Extension
.ktx2
Container
KTX 2.0
Compression
Basis Universal (ETC1S / UASTC) / Zstandard (zstd) Supercompression / Uncompressed
Algorithm
ETC1SUASTCZstandard (zstd)Raw GPU Formats (ASTC, BCn)
Color Depth
8-bit, 16-bit, 32-bit (Float)
Developed by
Khronos Group
Released
2021
Magic Bytes
AB 4B 54 58 20 32 30 BB 0D 0A 1A 0A
Browser Support Comparison
| Browser | HEJ2K | KTX2 |
|---|---|---|
|
|
✕ | ✕ |
|
|
✕ | ✕ |
|
|
✕ | ✕ |
|
|
✕ | ✕ |
|
|
✕ | ✕ |
HEJ2K
HEJ2K Strengths
- Brings the extensive capabilities of the HEIF container (like EXIF/XMP, thumbnails, and depth maps) to JPEG 2000
- Supports mathematically lossless compression via wavelet transformation
- High scalability and progressive decoding out of the box
Limitations
- Extremely limited software support outside of niche industries
- Zero native compatibility with web browsers
- High computational complexity compared to simpler formats like JPEG or PNG
KTX2
KTX2 Strengths
- Universal hardware compatibility: write once, transcode anywhere to the target GPU's preferred format (ASTC, BC7, PVRTC, etc.)
- Drastically reduces transmission size over networks thanks to Basis Universal and Zstandard supercompression
- Seamless integration with the glTF ecosystem for optimized 3D asset delivery
Limitations
- Requires WebAssembly (Wasm) decoders and JavaScript loaders for web viewing, increasing initial application payload slightly
- Encoding textures into high-quality Basis Universal UASTC can be computationally intensive and slow
- Zero support in traditional 2D image viewers or native OS previews
When to choose which format
HEJ2K
Use HEJ2K when…
- Medical Imaging
- Geospatial Data
- Scientific Archiving
KTX2
Use KTX2 when…
- glTF 3D Models (KHR_texture_basisu)
- WebGPU and WebGL Applications
- Game Engines (Unity, Unreal, Godot)
- Augmented and Virtual Reality (AR/VR)