ce2af6d313
- 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
34 lines
1.6 KiB
Diff
34 lines
1.6 KiB
Diff
From c12b77a6a6941fabc750a590159c7f9d98776ee4 Mon Sep 17 00:00:00 2001
|
|
From: "Rasyuqa A. H." <qampidh@gmail.com>
|
|
Date: Sat, 6 Jan 2024 02:50:10 +0700
|
|
Subject: [PATCH 2/3] KisFileIconCreator: add workaround for JPEG XL too
|
|
|
|
KImageFormats / QImage can crash if we update libjxl to >= 0.9.0 due to API changes.
|
|
On Krita, this can result in crash whenever the thumbnail loads in welcome screen.
|
|
|
|
This patch also enables thumbnail generation for JXL as well.
|
|
|
|
(cherry picked from commit 1da5a7a6c2b2be5ec5e04c39a9a8663696d2b367)
|
|
---
|
|
libs/ui/utils/KisFileIconCreator.cpp | 3 ++-
|
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/libs/ui/utils/KisFileIconCreator.cpp b/libs/ui/utils/KisFileIconCreator.cpp
|
|
index 17d0e482301a..25dd82d1fb09 100644
|
|
--- a/libs/ui/utils/KisFileIconCreator.cpp
|
|
+++ b/libs/ui/utils/KisFileIconCreator.cpp
|
|
@@ -112,8 +112,9 @@ bool KisFileIconCreator::createFileIcon(QString path, QIcon &icon, qreal deviceP
|
|
} else {
|
|
return false;
|
|
}
|
|
- } else if (mimeType == "image/tiff" || mimeType == "image/x-tiff") {
|
|
+ } else if (mimeType == "image/tiff" || mimeType == "image/x-tiff" || mimeType == "image/jxl") {
|
|
// Workaround for a bug in Qt tiff QImageIO plugin
|
|
+ // XXX: Also for JPEG-XL if KImageFormats haven't updated to accomodate libjxl >= v0.9.0 API changes.
|
|
QScopedPointer<KisDocument> doc(KisPart::instance()->createTemporaryDocument());
|
|
doc->setFileBatchMode(true);
|
|
bool r = doc->openPath(path, KisDocument::DontAddToRecent);
|
|
--
|
|
2.43.0
|
|
|