@@ -234,18 +234,30 @@ _cairo_image_surface_create_from_jxl(GInputStream *istream,
234234
235235 case JXL_DEC_COLOR_ENCODING :
236236#if HAVE_LCMS2
237- if (JxlDecoderGetColorAsEncodedProfile (dec , & pixel_format , JXL_COLOR_PROFILE_TARGET_DATA , NULL ) == JXL_DEC_SUCCESS )
237+ if (JxlDecoderGetColorAsEncodedProfile (dec ,
238+ #if JPEGXL_NUMERIC_VERSION < JPEGXL_COMPUTE_NUMERIC_VERSION (0 ,9 ,0 )
239+ & pixel_format ,
240+ #endif
241+ JXL_COLOR_PROFILE_TARGET_DATA , NULL ) == JXL_DEC_SUCCESS )
238242 break ;
239243
240244 {
241245 gsize profile_size ;
242- if (JxlDecoderGetICCProfileSize (dec , & pixel_format , JXL_COLOR_PROFILE_TARGET_DATA , & profile_size ) > 0 ) {
246+ if (JxlDecoderGetICCProfileSize (dec ,
247+ #if JPEGXL_NUMERIC_VERSION < JPEGXL_COMPUTE_NUMERIC_VERSION (0 ,9 ,0 )
248+ & pixel_format ,
249+ #endif
250+ JXL_COLOR_PROFILE_TARGET_DATA , & profile_size ) > 0 ) {
243251 g_message ("Could not get ICC profile size.\n" );
244252 break ;
245253 }
246254
247255 guchar * profile_data = g_new (guchar , profile_size );
248- if (JxlDecoderGetColorAsICCProfile (dec , & pixel_format , JXL_COLOR_PROFILE_TARGET_DATA , profile_data , profile_size ) > 0 ) {
256+ if (JxlDecoderGetColorAsICCProfile (dec ,
257+ #if JPEGXL_NUMERIC_VERSION < JPEGXL_COMPUTE_NUMERIC_VERSION (0 ,9 ,0 )
258+ & pixel_format ,
259+ #endif
260+ JXL_COLOR_PROFILE_TARGET_DATA , profile_data , profile_size ) > 0 ) {
249261 g_message ("Could not get ICC profile.\n" );
250262 g_free (profile_data );
251263 break ;
0 commit comments