diff --git a/apps/avifgainmaputil/convert_command.cc b/apps/avifgainmaputil/convert_command.cc index 47f149c75b..b799eb5dfd 100644 --- a/apps/avifgainmaputil/convert_command.cc +++ b/apps/avifgainmaputil/convert_command.cc @@ -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(arg_image_read_.pixel_format.value());