Skip to content

Commit

Permalink
Fail early when trying to convert a jpeg+gainmap image without libxml…
Browse files Browse the repository at this point in the history
…2. (#2526)
  • Loading branch information
maryla-uc authored Dec 20, 2024
1 parent 906ba91 commit 4db8f7e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions apps/avifgainmaputil/convert_command.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ ConvertCommand::ConvertCommand()
}

avifResult ConvertCommand::Run() {
#if !defined(AVIF_ENABLE_JPEG_GAIN_MAP_CONVERSION)
std::cout << "JPEG gainmap conversion unavailable because avifgainmaputil "
"was not built with libxml2.\n";
return AVIF_RESULT_NOT_IMPLEMENTED;
#endif

const avifPixelFormat pixel_format =
static_cast<avifPixelFormat>(arg_image_read_.pixel_format.value());

Expand Down

0 comments on commit 4db8f7e

Please sign in to comment.