White balance and matrix

WB_method chooses how camera RGB is balanced. matrix_method chooses the camera RGB to ACES transform. The settings below are the same operation in each language. Command-line method names are case-sensitive. Adobe is the spelling of that matrix method.

Both examples set soft crop. An absolute output_dir of /path/to/output places <stem>_aces.exr in that directory. create_dirs creates the directory itself and does not create missing parents, so /path/to must already exist. A failed call leaves status and last_error_message set and does not write the output.

Illuminant and spectral matrix

White balance to D55 and solve the matrix from camera spectral sensitivities. This needs the spectral database: camera sensitivities, an observer, and training spectra. Set RAWTOACES_DATA_PATH when that database is not on the default search path. D55 and 3200K are accepted in any case.

The output for photo.dng is /path/to/output/photo_aces.exr.

rawtoaces --crop-mode soft \
    --wb-method illuminant --illuminant D55 \
    --mat-method spectral \
    --output-dir /path/to/output --create-dirs \
    photo.dng

Custom multipliers

Use four white-balance multipliers from an external tool, and take the colour matrix from DNG metadata. The fourth multiplier is the second green. Metadata matrix conversion applies to DNG. The output is <stem>_aces.exr beside the input.

A custom matrix is a different method: --mat-method custom and custom_matrix. It must already be the complete camera RGB to ACES AP0 transform. The converter applies it as given and does not add adaptation or an XYZ to ACES step. The user guide shows the nine-value argument order.

rawtoaces --crop-mode soft \
    --wb-method custom --custom-wb 2.1 1.0 1.5 1.0 \
    --mat-method metadata \
    photo.dng

See also convert a single image and solve from spectra.