Convert a batch

Convert loose files and the RAW files in a directory with one set of settings. rta::util::collect_image_files() and rawtoaces.collect_image_files() group the arguments. Individual files share the first batch. Each directory becomes a later batch. Directory collection is not recursive. A missing path is reported on standard error and skipped. Files that are not a supported RAW extension are skipped. .DS_Store is ignored.

These examples use soft crop, write every output under the absolute directory /path/to/output, and replace an existing <stem>_aces.exr. create_dirs creates that directory and not its parents. Two inputs with the same file stem share one output name; with overwrite set, the later file replaces the earlier one.

The command and the library examples stop at the first conversion failure. Files already written are left in place. The command exits non-zero and prints the reason. If nothing was collected, the command prints its help and exits zero. The library examples treat that empty result as a failure so the caller can tell that no file was converted.

For photo.dng the output is /path/to/output/photo_aces.exr.

rawtoaces --crop-mode soft \
    --output-dir /path/to/output --create-dirs --overwrite \
    photo.dng /path/to/raw/files

The first batch is empty when every argument is a directory. Loop over every batch, including that empty one. See also convert a single image.