Exporting HLG Photos to AVIF: HDR Workflow Guide

Exporting photographs using Hybrid Log-Gamma (HLG) into the AVIF format allows photographers to preserve true high dynamic range (HDR) luminance and wide color gamuts for compatible displays while maintaining backward compatibility. This guide outlines the complete technical workflow for preparing, color managing, and encoding HLG still images into the AVIF container, detailing every step from raw development to metadata tagging.

1. Source Preparation and Raw Development

To achieve a true HLG photograph, the image must either be captured natively as an HLG file (available in select mirrorless cameras) or developed from a standard camera RAW file.

2. Setting the Transfer Function

Hybrid Log-Gamma relies on the ARIB STD-B67 standard (defined in ITU-R BT.2100). The image data must be mapped to this specific electro-optical transfer function (EOTF):

3. Bit Depth and Chroma Subsampling

Encoding HLG into AVIF demands precise parameters to prevent color banding and compression artifacts in highlight transitions:

4. Encoding to AVIF with NCLX Color Metadata

The AVIF container (based on the AV1 video codec) requires proper Color Information Box (NCLX) tags so that operating systems and web browsers correctly interpret the dynamic range.

If using a command-line tool like ffmpeg or cavif, apply the following ITU-R BT.2100 color parameters:

If exporting from a GUI application such as Adobe Lightroom or Photoshop:

  1. Select AVIF as the file format in the Export dialog.
  2. Check the HDR Output option.
  3. Select Rec. 2020 HLG as the export color space.

5. Verification and Validation

Before publishing, verify that the image renders correctly across platforms: