RawTherapee AVIF Export With Custom ICC Profiles

RawTherapee does not support exporting raw images directly to the AVIF (AV1 Image File) format, regardless of whether you are using standard or custom ICC profiles. While the software provides robust color management and full support for embedding custom output ICC profiles, its direct export capabilities are restricted to traditional image formats. To obtain an AVIF file with a custom ICC profile applied from RawTherapee, users must export to an intermediate format such as 16-bit TIFF and convert it using an external encoder.

Native Export Capabilities in RawTherapee

RawTherapee's save and queue options natively support three primary file formats:

None of the current stable releases of RawTherapee include an AVIF encoder. Consequently, you cannot select .avif as a direct output container from the Editor or the Batch Queue.

Color Management and Custom ICC Profiles

RawTherapee has comprehensive color management capabilities located in the Color tab under the Color Management panel. Users can assign custom output profiles by placing .icc or .icm files into the designated color profiles directory.

When you export an image, RawTherapee converts the internal working color space (such as ProPhoto RGB) into your selected output profile and embeds the ICC profile directly into the output file's metadata. This color management pipeline operates independently of the final delivery container, but it is limited to the formats RawTherapee can write directly.

To generate an AVIF image with your desired custom ICC profile from RawTherapee, use the following workflow:

  1. Set the Output Profile: Go to the Color Management panel in RawTherapee, select Custom under the Output Profile section, and choose your preferred ICC profile.
  2. Export as a 16-bit TIFF: Save the processed raw image as an uncompressed or lossless compressed 16-bit TIFF. This preserves maximum dynamic range, bit depth, and embeds the custom ICC profile.
  3. Convert to AVIF Externally: Use an external command-line tool or image processor that reads embedded ICC profiles and supports AVIF encoding, such as avifenc (from libavif) or ImageMagick.

Using avifenc

The official avifenc utility automatically reads and preserves embedded ICC profiles from TIFF sources by default:

avifenc --lossless input.tif output.avif

Or for lossy compression with visually lossless quality:

avifenc -s 4 -q 85 input.tif output.avif

Using ImageMagick

ImageMagick can also convert the file while retaining the embedded profile:

magick input.tif -quality 85 output.avif

By using a 16-bit intermediate file, you avoid banding and color degradation, ensuring that the final AVIF image retains the precise color characteristics defined by your custom ICC profile in RawTherapee.