Each attribute in the header names a type, which
decides how its value bytes are laid out. In the tables, int is 4 bytes,
unsigned int is 4 bytes, float is 4 bytes,
double is 8 bytes and unsigned long is 8 bytes, all
little-endian.
Predefined types
| Type | Layout |
|---|---|
box2i | 4 × int: xMin, yMin, xMax, yMax |
box2f | 4 × float: xMin, yMin, xMax, yMax |
bytes | A sequence of bytes, with an optional type hint (new in version 3.4) |
chlist | The channel entries below, then a zero byte |
chromaticities | 8 × float: redX, redY, greenX, greenY, blueX, blueY, whiteX, whiteY |
compression | 1 byte: a code below |
double | double |
envmap | 1 byte: 0 is ENVMAP_LATLONG, 1 is ENVMAP_CUBE |
float | float |
int | int |
keycode | 7 × int: filmMfcCode, filmType, prefix, count, perfOffset, perfsPerFrame, perfsPerCount |
lineOrder | 1 byte: a code below |
m33f | 9 × float |
m44f | 16 × float |
preview | 2 × unsigned int (width, height), then width × height × 4 bytes of red, green, blue and alpha, top to bottom and left to right |
rational | int, then unsigned int |
string | int length, then that many characters |
stringvector | Zero or more strings, each an int length and its characters. The count comes from the attribute size. |
tiledesc | 2 × unsigned int (xSize, ySize), then 1 byte: levelMode + roundingMode × 16 |
timecode | 2 × unsigned int: timeAndFlags, userData |
v2i, v3i | 2 or 3 × int |
v2f, v3f | 2 or 3 × float |
Channel list
A chlist value is a list of these entries, ended by a zero byte:
| Field | Type | Description |
|---|---|---|
| Name | zero-terminated text | 1 to 255 bytes. |
| Pixel type | int | A code below. |
| pLinear | 1 byte | 0 or 1. |
| Reserved | 3 bytes | Zero. |
| xSampling | int | Horizontal sampling rate. |
| ySampling | int | Vertical sampling rate. |
| Pixel type | Value | Bytes per sample |
|---|---|---|
UINT | 0 | 4 |
HALF | 1 | 2 |
FLOAT | 2 | 4 |
Compression codes
| Name | Value | Method |
|---|---|---|
NO_COMPRESSION | 0 | None. |
RLE_COMPRESSION | 1 | Lossless run-length encoding. |
ZIPS_COMPRESSION | 2 | Lossless deflate, one scan line at a time. |
ZIP_COMPRESSION | 3 | Lossless deflate on blocks of 16 scan lines. |
PIZ_COMPRESSION | 4 | Lossless wavelet and Huffman coding, good for grainy images. |
PXR24_COMPRESSION | 5 | Reduces 32-bit floats to 24 bits, then deflates. Lossless for HALF and UINT; slightly lossy for FLOAT. |
B44_COMPRESSION | 6 | Lossy for HALF in 4 by 4 blocks. UINT and FLOAT are stored uncompressed. |
B44A_COMPRESSION | 7 | As B44, with extra compression for flat areas such as alpha channels. |
DWAA_COMPRESSION | 8 | Lossy, JPEG-like, on 32 scan lines, for RGB data. |
DWAB_COMPRESSION | 9 | Lossy, JPEG-like, on 256 scan lines, for RGB data. |
HTJ2K256_COMPRESSION | 10 | Lossless High-Throughput JPEG 2000 on 256 scan lines, for HALF, FLOAT and UINT. |
HTJ2K32_COMPRESSION | 11 | Lossless High-Throughput JPEG 2000 on 32 scan lines, for HALF, FLOAT and UINT. |
The chunks page lists the lines per block. PXR24, B44 and B44A are not used in deep files.
Other codes
| Field | Name | Value |
|---|---|---|
| lineOrder | INCREASING_Y | 0 |
| lineOrder | DECREASING_Y | 1 |
| lineOrder | RANDOM_Y | 2 |
| tiledesc levelMode | ONE_LEVEL | 0 |
| tiledesc levelMode | MIPMAP_LEVELS | 1 |
| tiledesc levelMode | RIPMAP_LEVELS | 2 |
| tiledesc roundingMode | ROUND_DOWN | 0 |
| tiledesc roundingMode | ROUND_UP | 1 |
Standard optional attributes
Applications can add attributes of their own. The OpenEXR project lists these as the standard optional attributes.
| Name | Type | Meaning |
|---|---|---|
originalDataWindow | box2i | Data window of the original image, kept when software crops it. |
worldToCamera | m44f | Matrix from world space to the renderer’s camera space. |
worldToNDC | m44f | Matrix from world space to normalised device coordinates. |
sensorCenterOffset | v2f | Offset in microns of the sensor centre from the lens mount centre. |
sensorOverallDimensions | v2f | Size of the sensor’s light-sensitive area, in millimetres. |
sensorPhotositePitch | float | Distance between photosite centres, in microns. |
sensorAcquisitionRectangle | box2i | Sensor area that corresponds to the captured pixels. |
xDensity | float | Horizontal output density in pixels per inch. |
longitude, latitude, altitude | float | Recording location: east of Greenwich, north of the equator, and metres above sea level. |
cameraMake, cameraModel, cameraSerialNumber, cameraFirmwareVersion, cameraUuid, cameraLabel | string | Camera identification and a label for how it was used. |
cameraCCTSetting, cameraTintSetting | float | Configured colour temperature in Kelvin and green or magenta tint. |
cameraColorBalance | v2f | CIE 1960 UCS chromaticity treated as neutral. |
isoSpeed, expTime, shutterAngle | float | ISO setting, exposure time in seconds and shutter angle in degrees. |
captureRate | rational | Capture rate in frames per second. |
lensMake, lensModel, lensSerialNumber, lensFirmwareVersion | string | Lens identification. |
nominalFocalLength, pinholeFocalLength, effectiveFocalLength | float | Focal length in millimetres: as printed on the lens, in the pinhole model, and for a thick lens. |
entrancePupilOffset | float | Axial distance from the image plane to the entrance pupil, in millimetres; can be negative. |
aperture, tStop | float | The lens f-number, and the transmittance-corrected value. |
focus | float | Focus distance in metres. |
owner, comments | string | The image owner’s name, and a description. |
capDate | string | Capture date in local time, YYYY:MM:DD hh:mm:ss. |
utcOffset | float | Offset in seconds between UTC and local time. |
keyCode | keycode | Film manufacturer, type, roll and frame position. |
framesPerSecond | rational | Nominal playback frame rate; 24 if absent. |
timeCode | timecode | Time and control code. |
imageCounter | int | Image number giving the intended play order. |
reelName | string | Name for a sequence of unique images. |
ascFramingDecisionList | string | JSON-encoded ASC-FDL framing decisions. |
chromaticities | chromaticities | CIE xy of the RGB primaries and white point; largely replaced by colorInteropID. |
colorInteropID | string | Identifier for the RGB colour space (new in version 3.4). |
whiteLuminance | float | Luminance, in nits, of RGB (1, 1, 1). |
adoptedNeutral | v2f | CIE xy chromaticity to render as neutral on a display. |
acesImageContainerFlag | int | 1 means the file follows the SMPTE ST 2065-4 ACES layout. |
envmap | envmap | Marks the image as an environment map. |
wrapmodes | string | Texture extrapolation modes: black, clamp, periodic, mirror. |
multiView | stringvector | View names for multi-view files, such as left and right eye. |
deepImageState | deepImageState | Whether deep pixels are sorted and non-overlapping; not checked by the library. |
idManifest | idManifest | ID manifest. |
Deprecated attributes include dwaCompressionLevel, the quality setting for
DWA, and renderingTransform and lookModTransform, which name
CTL transforms. The byte layouts of deepImageState and
idManifest are not given in the file layout document; the C++ library is
the authority for them.