[packages/ka5-krita] - adapt to libjxl 0.9.x API changes

qboosh qboosh at pld-linux.org
Sun Apr 28 10:13:05 CEST 2024


commit 4512dadeada188074b119751e64d7426fd27e918
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Apr 28 09:01:10 2024 +0200

    - adapt to libjxl 0.9.x API changes

 krita-libjxl.patch | 43 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)
---
diff --git a/krita-libjxl.patch b/krita-libjxl.patch
new file mode 100644
index 0000000..3dd67f7
--- /dev/null
+++ b/krita-libjxl.patch
@@ -0,0 +1,43 @@
+--- krita-5.2.2/plugins/impex/jxl/JPEGXLImport.cpp.orig	2023-12-06 12:38:26.000000000 +0100
++++ krita-5.2.2/plugins/impex/jxl/JPEGXLImport.cpp	2024-04-27 23:12:27.199621223 +0200
+@@ -511,7 +511,6 @@ JPEGXLImport::convert(KisDocument *docum
+             JxlColorEncoding colorEncoding{};
+             if (JXL_DEC_SUCCESS
+                 == JxlDecoderGetColorAsEncodedProfile(dec.get(),
+-                                                      nullptr,
+                                                       JXL_COLOR_PROFILE_TARGET_DATA,
+                                                       &colorEncoding)) {
+                 const TransferCharacteristics transferFunction = [&]() {
+@@ -635,7 +634,7 @@ JPEGXLImport::convert(KisDocument *docum
+                 size_t iccSize = 0;
+                 QByteArray iccProfile;
+                 if (JXL_DEC_SUCCESS
+-                    != JxlDecoderGetICCProfileSize(dec.get(), nullptr, JXL_COLOR_PROFILE_TARGET_DATA, &iccSize)) {
++                    != JxlDecoderGetICCProfileSize(dec.get(), JXL_COLOR_PROFILE_TARGET_DATA, &iccSize)) {
+                     errFile << "ICC profile size retrieval failed";
+                     document->setErrorMessage(i18nc("JPEG-XL errors", "Unable to read the image profile."));
+                     return ImportExportCodes::ErrorWhileReading;
+@@ -643,7 +642,6 @@ JPEGXLImport::convert(KisDocument *docum
+                 iccProfile.resize(static_cast<int>(iccSize));
+                 if (JXL_DEC_SUCCESS
+                     != JxlDecoderGetColorAsICCProfile(dec.get(),
+-                                                      nullptr,
+                                                       JXL_COLOR_PROFILE_TARGET_DATA,
+                                                       reinterpret_cast<uint8_t *>(iccProfile.data()),
+                                                       static_cast<size_t>(iccProfile.size()))) {
+@@ -657,7 +655,6 @@ JPEGXLImport::convert(KisDocument *docum
+                 if (!d.m_info.uses_original_profile) {
+                     if (JXL_DEC_SUCCESS
+                         != JxlDecoderGetICCProfileSize(dec.get(),
+-                                                       nullptr,
+                                                        JXL_COLOR_PROFILE_TARGET_ORIGINAL,
+                                                        &iccTargetSize)) {
+                         errFile << "ICC profile size retrieval failed";
+@@ -667,7 +664,6 @@ JPEGXLImport::convert(KisDocument *docum
+                     iccTargetProfile.resize(static_cast<int>(iccTargetSize));
+                     if (JXL_DEC_SUCCESS
+                         != JxlDecoderGetColorAsICCProfile(dec.get(),
+-                                                          nullptr,
+                                                           JXL_COLOR_PROFILE_TARGET_ORIGINAL,
+                                                           reinterpret_cast<uint8_t *>(iccTargetProfile.data()),
+                                                           static_cast<size_t>(iccTargetProfile.size()))) {
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ka5-krita.git/commitdiff/4512dadeada188074b119751e64d7426fd27e918



More information about the pld-cvs-commit mailing list