Warning, /graphics/krita/3rdparty/ext_frameworks/0001-comment-out-jxl-0.9.0-API-change.patch is written in an unsupported language. File is not indexed.
0001 From 2188bbc57adb02bf320cecf493885d16e294e33d Mon Sep 17 00:00:00 2001
0002 From: Ivan Yossi <ghevan@gmail.com>
0003 Date: Mon, 15 Jan 2024 14:14:28 -0600
0004 Subject: [PATCH] comment out jxl 0.9.0 API change
0005
0006 ---
0007 src/imageformats/jxl.cpp | 18 +++++++++++++++---
0008 1 file changed, 15 insertions(+), 3 deletions(-)
0009
0010 diff --git a/src/imageformats/jxl.cpp b/src/imageformats/jxl.cpp
0011 index 2501086..ee2b751 100644
0012 --- a/src/imageformats/jxl.cpp
0013 +++ b/src/imageformats/jxl.cpp
0014 @@ -269,18 +269,30 @@ bool QJpegXLHandler::countALLFrames()
0015 }
0016 }
0017
0018 - status = JxlDecoderGetColorAsEncodedProfile(m_decoder, &m_input_pixel_format, JXL_COLOR_PROFILE_TARGET_DATA, &color_encoding);
0019 + status = JxlDecoderGetColorAsEncodedProfile(m_decoder,
0020 +#if JPEGXL_NUMERIC_VERSION < JPEGXL_COMPUTE_NUMERIC_VERSION(0, 9, 0)
0021 + &m_input_pixel_format,
0022 +#endif
0023 + JXL_COLOR_PROFILE_TARGET_DATA,
0024 + &color_encoding);
0025
0026 if (status == JXL_DEC_SUCCESS && color_encoding.color_space == JXL_COLOR_SPACE_RGB && color_encoding.white_point == JXL_WHITE_POINT_D65
0027 && color_encoding.primaries == JXL_PRIMARIES_SRGB && color_encoding.transfer_function == JXL_TRANSFER_FUNCTION_SRGB) {
0028 m_colorspace = QColorSpace(QColorSpace::SRgb);
0029 } else {
0030 size_t icc_size = 0;
0031 - if (JxlDecoderGetICCProfileSize(m_decoder, &m_input_pixel_format, JXL_COLOR_PROFILE_TARGET_DATA, &icc_size) == JXL_DEC_SUCCESS) {
0032 + if (JxlDecoderGetICCProfileSize(m_decoder,
0033 +#if JPEGXL_NUMERIC_VERSION < JPEGXL_COMPUTE_NUMERIC_VERSION(0, 9, 0)
0034 + &m_input_pixel_format,
0035 +#endif
0036 + JXL_COLOR_PROFILE_TARGET_DATA,
0037 + &icc_size) == JXL_DEC_SUCCESS) {
0038 if (icc_size > 0) {
0039 QByteArray icc_data(icc_size, 0);
0040 if (JxlDecoderGetColorAsICCProfile(m_decoder,
0041 - &m_input_pixel_format,
0042 +#if JPEGXL_NUMERIC_VERSION < JPEGXL_COMPUTE_NUMERIC_VERSION(0, 9, 0)
0043 + &m_input_pixel_format,
0044 +#endif
0045 JXL_COLOR_PROFILE_TARGET_DATA,
0046 reinterpret_cast<uint8_t *>(icc_data.data()),
0047 icc_data.size())
0048 --
0049 2.39.3 (Apple Git-145)
0050