* [gentoo-commits] repo/proj/guru:master commit in: media-plugins/qt-heif-image-plugin/, media-plugins/qt-heif-image-plugin/files/
@ 2020-09-08 10:30 Andrew Ammerlaan
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Ammerlaan @ 2020-09-08 10:30 UTC (permalink / raw
To: gentoo-commits
commit: 9d365f384660d090ca0baff6b95c67cc4005dbe9
Author: Sergey Torokhov <torokhov-s-a <AT> yandex <DOT> ru>
AuthorDate: Sun Sep 6 18:09:05 2020 +0000
Commit: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
CommitDate: Sun Sep 6 18:10:32 2020 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=9d365f38
media-plugins/qt-heif-image-plugin: load RGB888 heif images with libheif 1.7.0
Add upstream patch to fix issue.
Signed-off-by: Sergey Torokhov <torokhov-s-a <AT> yandex.ru>
.../files/qt-heif-image-plugin-0.3.3_RGB88.patch | 49 ++++++++++++++++++++++
.../qt-heif-image-plugin-0.3.3-r1.ebuild | 24 +++++++++++
2 files changed, 73 insertions(+)
diff --git a/media-plugins/qt-heif-image-plugin/files/qt-heif-image-plugin-0.3.3_RGB88.patch b/media-plugins/qt-heif-image-plugin/files/qt-heif-image-plugin-0.3.3_RGB88.patch
new file mode 100644
index 00000000..03ae7eea
--- /dev/null
+++ b/media-plugins/qt-heif-image-plugin/files/qt-heif-image-plugin-0.3.3_RGB88.patch
@@ -0,0 +1,49 @@
+From 3288ae60b96efa404fbeb40598a8567bc8c75761 Mon Sep 17 00:00:00 2001
+From: Markus Diem <diemmarkus@gmail.com>
+Date: Mon, 22 Jun 2020 11:12:12 +0200
+Subject: [PATCH] maps color format from HEIF to Qt (i.e. RGB88)
+
+- this patch is needed to load RGB888 heif images with libheif 1.7.0
+- maps heif_chroma_interleaved_RGB to QImage::Format_RGB888
+- other conversions are not added because I don't have test images
+---
+ src/qheifhandler.cpp | 20 +++++++++++++++++++-
+ 1 file changed, 19 insertions(+), 1 deletion(-)
+
+diff --git a/src/qheifhandler.cpp b/src/qheifhandler.cpp
+index e1b9933..822c45d 100644
+--- a/src/qheifhandler.cpp
++++ b/src/qheifhandler.cpp
+@@ -288,13 +288,31 @@ bool QHeifHandler::read(QImage* destImage)
+ qWarning("QHeifHandler::read() invalid stride: %d", stride);
+ return false;
+ }
++
++ // map image format
++ heif_chroma heifFormat = heif_image_get_chroma_format(srcImage.get());
++ QImage::Format qtFormat;
+
++ switch (heifFormat) {
++ case heif_chroma_interleaved_RGB: {
++ qtFormat = QImage::Format_RGB888;
++ break;
++ }
++ case heif_chroma_interleaved_RGBA: {
++ qtFormat = QImage::Format_RGBA8888;
++ break;
++ }
++ // TODO: add other formats i.e. heif_chroma_monochrome here
++ default:
++ qtFormat = QImage::Format_RGBA8888;
++ }
++
+ // move data ownership to QImage
+ heif_image* dataImage = srcImage.release();
+
+ *destImage = QImage(
+ data, imgSize.width(), imgSize.height(),
+- stride, QImage::Format_RGBA8888,
++ stride, qtFormat,
+ [](void* img) { heif_image_release(static_cast<heif_image*>(img)); },
+ dataImage
+ );
diff --git a/media-plugins/qt-heif-image-plugin/qt-heif-image-plugin-0.3.3-r1.ebuild b/media-plugins/qt-heif-image-plugin/qt-heif-image-plugin-0.3.3-r1.ebuild
new file mode 100644
index 00000000..67131833
--- /dev/null
+++ b/media-plugins/qt-heif-image-plugin/qt-heif-image-plugin-0.3.3-r1.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake
+
+DESCRIPTION="Qt plugin for HEIF images"
+HOMEPAGE="https://github.com/jakar/qt-heif-image-plugin"
+SRC_URI="https://github.com/jakar/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="LGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="
+ dev-qt/qtcore
+ dev-qt/qtgui
+ >=media-libs/libheif-1.6.1:0=
+"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=( "${FILESDIR}/${P}_RGB88.patch" )
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/proj/guru:master commit in: media-plugins/qt-heif-image-plugin/, media-plugins/qt-heif-image-plugin/files/
@ 2024-05-07 3:54 Rui Huang
0 siblings, 0 replies; 2+ messages in thread
From: Rui Huang @ 2024-05-07 3:54 UTC (permalink / raw
To: gentoo-commits
commit: 94a9dcd3055dd15891b6decee1ed597b23f92d8d
Author: Sergey Torokhov <torokhov-s-a <AT> yandex <DOT> ru>
AuthorDate: Mon May 6 20:27:15 2024 +0000
Commit: Rui Huang <vowstar <AT> gmail <DOT> com>
CommitDate: Mon May 6 20:27:15 2024 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=94a9dcd3
media-plugins/qt-heif-image-plugin: drop old 0.3.3-r3
Signed-off-by: Sergey Torokhov <torokhov-s-a <AT> yandex.ru>
media-plugins/qt-heif-image-plugin/Manifest | 1 -
.../files/qt-heif-image-plugin-0.3.3_RGB88.patch | 49 ----------------------
.../qt-heif-image-plugin-0.3.3-r3.ebuild | 24 -----------
3 files changed, 74 deletions(-)
diff --git a/media-plugins/qt-heif-image-plugin/Manifest b/media-plugins/qt-heif-image-plugin/Manifest
index bf84023ebe..445ecda86b 100644
--- a/media-plugins/qt-heif-image-plugin/Manifest
+++ b/media-plugins/qt-heif-image-plugin/Manifest
@@ -1,2 +1 @@
-DIST qt-heif-image-plugin-0.3.3.tar.gz 16449 BLAKE2B f304e26ff60d0fbe840a40c3782543f9db17e7f8fd429b93b0de6663d85110cceff1b67bab996ae63cad12ee06608c74ce9c5e180f154e3df8fee2ccdcd849a9 SHA512 ba617d11e73d73dee5220b668918e313b6d856cabc1567b9221ddb2b3d35c4bfefadcd9e4485bdc7c280be104d09c3580e245d9a8f72c9fac397ebe84fe55e2f
DIST qt-heif-image-plugin-0.3.4.tar.gz 16736 BLAKE2B c2b923d543390c1c7cade8c435367bc7533066e6860e2242ea041592262d6d777e63284ba340580366f862921e7bbb53025998dd09cb3facd434a90722e57c3c SHA512 bdb2cf797d897408c31ffb4b84cd29ce5755a633ec38bbf8ce307f1ed0cc274203d11f3450450536ddc7f4ff4621f73d2c84fd7133dd00c16775f538133c03f5
diff --git a/media-plugins/qt-heif-image-plugin/files/qt-heif-image-plugin-0.3.3_RGB88.patch b/media-plugins/qt-heif-image-plugin/files/qt-heif-image-plugin-0.3.3_RGB88.patch
deleted file mode 100644
index 03ae7eea53..0000000000
--- a/media-plugins/qt-heif-image-plugin/files/qt-heif-image-plugin-0.3.3_RGB88.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 3288ae60b96efa404fbeb40598a8567bc8c75761 Mon Sep 17 00:00:00 2001
-From: Markus Diem <diemmarkus@gmail.com>
-Date: Mon, 22 Jun 2020 11:12:12 +0200
-Subject: [PATCH] maps color format from HEIF to Qt (i.e. RGB88)
-
-- this patch is needed to load RGB888 heif images with libheif 1.7.0
-- maps heif_chroma_interleaved_RGB to QImage::Format_RGB888
-- other conversions are not added because I don't have test images
----
- src/qheifhandler.cpp | 20 +++++++++++++++++++-
- 1 file changed, 19 insertions(+), 1 deletion(-)
-
-diff --git a/src/qheifhandler.cpp b/src/qheifhandler.cpp
-index e1b9933..822c45d 100644
---- a/src/qheifhandler.cpp
-+++ b/src/qheifhandler.cpp
-@@ -288,13 +288,31 @@ bool QHeifHandler::read(QImage* destImage)
- qWarning("QHeifHandler::read() invalid stride: %d", stride);
- return false;
- }
-+
-+ // map image format
-+ heif_chroma heifFormat = heif_image_get_chroma_format(srcImage.get());
-+ QImage::Format qtFormat;
-
-+ switch (heifFormat) {
-+ case heif_chroma_interleaved_RGB: {
-+ qtFormat = QImage::Format_RGB888;
-+ break;
-+ }
-+ case heif_chroma_interleaved_RGBA: {
-+ qtFormat = QImage::Format_RGBA8888;
-+ break;
-+ }
-+ // TODO: add other formats i.e. heif_chroma_monochrome here
-+ default:
-+ qtFormat = QImage::Format_RGBA8888;
-+ }
-+
- // move data ownership to QImage
- heif_image* dataImage = srcImage.release();
-
- *destImage = QImage(
- data, imgSize.width(), imgSize.height(),
-- stride, QImage::Format_RGBA8888,
-+ stride, qtFormat,
- [](void* img) { heif_image_release(static_cast<heif_image*>(img)); },
- dataImage
- );
diff --git a/media-plugins/qt-heif-image-plugin/qt-heif-image-plugin-0.3.3-r3.ebuild b/media-plugins/qt-heif-image-plugin/qt-heif-image-plugin-0.3.3-r3.ebuild
deleted file mode 100644
index f83c7486b2..0000000000
--- a/media-plugins/qt-heif-image-plugin/qt-heif-image-plugin-0.3.3-r3.ebuild
+++ /dev/null
@@ -1,24 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit cmake
-
-DESCRIPTION="Qt plugin for HEIF images"
-HOMEPAGE="https://github.com/jakar/qt-heif-image-plugin"
-SRC_URI="https://github.com/jakar/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="LGPL-3"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-
-RDEPEND="
- dev-qt/qtcore
- dev-qt/qtgui
- >=media-libs/libheif-1.12.0:0=
-"
-DEPEND="${RDEPEND}"
-BDEPEND="virtual/pkgconfig"
-
-PATCHES=( "${FILESDIR}/${P}_RGB88.patch" )
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-05-07 3:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-07 3:54 [gentoo-commits] repo/proj/guru:master commit in: media-plugins/qt-heif-image-plugin/, media-plugins/qt-heif-image-plugin/files/ Rui Huang
-- strict thread matches above, loose matches on Subject: below --
2020-09-08 10:30 Andrew Ammerlaan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox