Skip to content

Commit

Permalink
Fail early when trying to convert a jpeg+gainmap image without libxml2.
Browse files Browse the repository at this point in the history
  • Loading branch information
maryla-uc committed Dec 20, 2024
1 parent f439662 commit 51bbc4e
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 51bbc4e

Please sign in to comment.