Removed
Link Here
|
1 |
https://github.com/ImageMagick/ImageMagick/commit/9db502e6a70c |
2 |
|
3 |
--- coders/jxl.c.orig 2023-02-12 15:55:38 UTC |
4 |
+++ coders/jxl.c |
5 |
@@ -444,8 +444,13 @@ static Image *ReadJXLImage(const ImageInfo *image_info |
6 |
*profile; |
7 |
|
8 |
JXLSetFormat(image,&pixel_format,exception); |
9 |
+#if JPEGXL_NUMERIC_VERSION >= JPEGXL_COMPUTE_NUMERIC_VERSION(0,9,0) |
10 |
+ jxl_status=JxlDecoderGetColorAsEncodedProfile(jxl_info, |
11 |
+ JXL_COLOR_PROFILE_TARGET_DATA,&color_encoding); |
12 |
+#else |
13 |
jxl_status=JxlDecoderGetColorAsEncodedProfile(jxl_info,&pixel_format, |
14 |
JXL_COLOR_PROFILE_TARGET_DATA,&color_encoding); |
15 |
+#endif |
16 |
if (jxl_status == JXL_DEC_SUCCESS) |
17 |
{ |
18 |
if (color_encoding.transfer_function == JXL_TRANSFER_FUNCTION_LINEAR) |
19 |
@@ -460,14 +465,25 @@ static Image *ReadJXLImage(const ImageInfo *image_info |
20 |
else |
21 |
if (jxl_status != JXL_DEC_ERROR) |
22 |
break; |
23 |
+#if JPEGXL_NUMERIC_VERSION >= JPEGXL_COMPUTE_NUMERIC_VERSION(0,9,0) |
24 |
+ jxl_status=JxlDecoderGetICCProfileSize(jxl_info, |
25 |
+ JXL_COLOR_PROFILE_TARGET_ORIGINAL,&profile_size); |
26 |
+#else |
27 |
jxl_status=JxlDecoderGetICCProfileSize(jxl_info,&pixel_format, |
28 |
JXL_COLOR_PROFILE_TARGET_ORIGINAL,&profile_size); |
29 |
+#endif |
30 |
if (jxl_status != JXL_DEC_SUCCESS) |
31 |
break; |
32 |
profile=AcquireStringInfo(profile_size); |
33 |
+#if JPEGXL_NUMERIC_VERSION >= JPEGXL_COMPUTE_NUMERIC_VERSION(0,9,0) |
34 |
+ jxl_status=JxlDecoderGetColorAsICCProfile(jxl_info, |
35 |
+ JXL_COLOR_PROFILE_TARGET_ORIGINAL,GetStringInfoDatum(profile), |
36 |
+ profile_size); |
37 |
+#else |
38 |
jxl_status=JxlDecoderGetColorAsICCProfile(jxl_info,&pixel_format, |
39 |
JXL_COLOR_PROFILE_TARGET_ORIGINAL,GetStringInfoDatum(profile), |
40 |
profile_size); |
41 |
+#endif |
42 |
(void) SetImageProfile(image,"icc",profile,exception); |
43 |
profile=DestroyStringInfo(profile); |
44 |
if (jxl_status == JXL_DEC_SUCCESS) |