SHA256
1
0
forked from pool/krita
krita/0003-JPEG-XL-Disable-export-bug-workaround-for-libjxl-0.9.patch
Christophe Marin ce2af6d313 Accepting request 1139885 from home:Vogtinator:branches:KDE:Extra
- Add patches to support libjxl >= 0.9.0:
  * 0001-Fix-build-with-libjxl-0.9.0.patch
  * 0002-KisFileIconCreator-add-workaround-for-JPEG-XL-too.patch
  * 0003-JPEG-XL-Disable-export-bug-workaround-for-libjxl-0.9.patch

OBS-URL: https://build.opensuse.org/request/show/1139885
OBS-URL: https://build.opensuse.org/package/show/KDE:Extra/krita?expand=0&rev=193
2024-01-19 12:11:27 +00:00

37 lines
1.4 KiB
Diff

From b299812aaf8b79223b4523a43c1427e343b2e753 Mon Sep 17 00:00:00 2001
From: "Rasyuqa A. H." <qampidh@gmail.com>
Date: Mon, 8 Jan 2024 17:48:34 +0700
Subject: [PATCH 3/3] JPEG-XL: Disable export bug workaround for libjxl >=
0.9.0
(cherry picked from commit 546765dfd396a4bb482b98a7b6ca22f1dca809af)
---
plugins/impex/jxl/JPEGXLExport.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/plugins/impex/jxl/JPEGXLExport.cpp b/plugins/impex/jxl/JPEGXLExport.cpp
index e0d22f0d298a..f662cf4476cd 100644
--- a/plugins/impex/jxl/JPEGXLExport.cpp
+++ b/plugins/impex/jxl/JPEGXLExport.cpp
@@ -832,14 +832,16 @@ KisImportExportErrorCode JPEGXLExport::convert(KisDocument *document, QIODevice
}();
// XXX: Workaround for a buggy lossless patches. Set to disable instead.
- // TODO Kampidh: revisit this when upstream got fixed.
+ // Patch only for libjxl under v0.9.0
//
// See: https://github.com/libjxl/libjxl/issues/2463
const int setPatches = [&]() -> int {
+#if JPEGXL_NUMERIC_VERSION < JPEGXL_COMPUTE_NUMERIC_VERSION(0, 9, 0)
if ((cfg->getInt("effort", 7) > 4) && !cfg->getBool("flattenLayers", true)) {
warnFile << "Using workaround for layer exports, disabling patches option on effort > 4";
return 0;
}
+#endif
return cfg->getInt("patches", -1);
}();
--
2.43.0