diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2019-05-18 00:10:51 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2019-05-18 00:10:51 +0100 |
commit | eccb70a7f91b2d22582587f26d1a28bb31408b45 (patch) | |
tree | 3223e1fd54201bcf4ebecac6fbe87361cbe643e2 /media-gfx/kxstitch | |
parent | a2810985afabcc31d3eace5e61d8ea25b852ba17 (diff) |
gentoo resync : 18.05.2019
Diffstat (limited to 'media-gfx/kxstitch')
-rw-r--r-- | media-gfx/kxstitch/Manifest | 3 | ||||
-rw-r--r-- | media-gfx/kxstitch/files/kxstitch-2.1.1-imagemagick-fix.patch | 99 | ||||
-rw-r--r-- | media-gfx/kxstitch/kxstitch-2.1.1-r2.ebuild (renamed from media-gfx/kxstitch/kxstitch-2.1.1-r1.ebuild) | 5 |
3 files changed, 105 insertions, 2 deletions
diff --git a/media-gfx/kxstitch/Manifest b/media-gfx/kxstitch/Manifest index 043f296a202f..02f526947b63 100644 --- a/media-gfx/kxstitch/Manifest +++ b/media-gfx/kxstitch/Manifest @@ -1,4 +1,5 @@ +AUX kxstitch-2.1.1-imagemagick-fix.patch 4051 BLAKE2B f7f19ec8e5168fd421e08b4b19a3ab51964d5747d129b65f4e6eb1436dbc5638c4d7077f7fcf044e5e2ae89a09324b82be89de26e864f34c605d7382ebe64cbd SHA512 f13c4bacde6973aafc186d9576bd04e49574ffe8d42bc475017c1f2f353d39debebd8a81671e86ef67863306269339ae1542289f222874bd03a06a22c785090b AUX kxstitch-2.1.1-qt-5.11.patch 992 BLAKE2B f0be157270ddd27e1f997f57afbb8e3d80c31816334664a7a2804c4c9971a81c11ecd775820b7fe0db36dff7ea00d046c7f005a0bf715e9336f4f238a36c2b18 SHA512 93d6a5ddc2fa928369b09637ee6b856ba60d35d02e5e93f16fc08c4fdbc2ebead44224d2ad98fa2ffe6efcea8b93a0211eb00ad83c9cd91b8ddc30edff17602e DIST kxstitch-2.1.1.tar.xz 1726364 BLAKE2B 47257408f31ca7db4bddf984150baac6cd850206cedb95c73b0d62ee9f966028afd97bb3653b385104a1c679512c35f41aa25c5b703c715e565d48cfda59da36 SHA512 d5a6b6d06bfb894dd7404cb81350389f1ebf5c8a463eb792358abd67f362d1e1f578d06319461a006625864f1c4a69ebb4ccd0db422870c3eae0516c9132a3b3 -EBUILD kxstitch-2.1.1-r1.ebuild 964 BLAKE2B 19695be54baf8f3a0f8d21eb48f02f13d9513672d89d7c3d0f22ca8d51356bf52360424fdb2b097d0f22890103b56e95a9afaedb6d98688384dd94c5f164b952 SHA512 6d962753cad9e1fec89043d9039e14996bc161d343447a8d674a1defceb1d4eaeec55e47f463b7685390282da01525cdaad0610ccabba1eb393e15a6f1160dd7 +EBUILD kxstitch-2.1.1-r2.ebuild 1007 BLAKE2B 1a4af1f260e79a82893e1d3b34feed8c6f1e603d52ac9de54492792f07d1b330504db0f0742bc653545a3e73cd48c44da5d6a57da453526af28ede84d898949e SHA512 9250c6dec14536960ed0b365dfae6d857353901a6ad48ad6e173af3c23e6f80f6be7129e94385f26d335f927c14f2e0bcf44decd1e9e2bd89c9e8fcdad0ab42c MISC metadata.xml 249 BLAKE2B ad415db89e5dee1627aa77f44ded9d4e1e5b8217d06c7ca25bbaa3fe92ce67c2b1090957c45a821b407d7927e5af798498aa6a5b903895ee1af8ee20a446c7f7 SHA512 76a5a340b13f0053ca3c5e94ed24380ea8d29b45ac8655419e22eaadb1e4a827c04d2e7e36b65145c4964e6526f656618fc6ac144e277ef53cb7373e6239e3c3 diff --git a/media-gfx/kxstitch/files/kxstitch-2.1.1-imagemagick-fix.patch b/media-gfx/kxstitch/files/kxstitch-2.1.1-imagemagick-fix.patch new file mode 100644 index 000000000000..bf8c5e14096b --- /dev/null +++ b/media-gfx/kxstitch/files/kxstitch-2.1.1-imagemagick-fix.patch @@ -0,0 +1,99 @@ +From 75a129d3c2f21914a47b970df822e485aca625ac Mon Sep 17 00:00:00 2001 +From: Steve Allewell <steve.allewell@gmail.com> +Date: Sun, 11 Nov 2018 15:48:50 +0000 +Subject: Fix for importing images for V6 of ImageMagick + +The getPixelColor in V6 of ImageMagick does not appear to return the +same information as in V7, consequently importing images has resulted in +a black image when using V6 of ImageMagick. This fix reverts the change +made in commit 295773f44bfda1227d85edf065a8de14dc889159 when using V6. + +Big thanks to Sean Enck for reporting and helping diagnose the problem. +--- + src/ImportImageDlg.cpp | 16 ++++++++++++++++ + src/MainWindow.cpp | 17 +++++++++++++++++ + 2 files changed, 33 insertions(+) + +diff --git a/src/ImportImageDlg.cpp b/src/ImportImageDlg.cpp +index e6396c6..340ff1d 100644 +--- a/src/ImportImageDlg.cpp ++++ b/src/ImportImageDlg.cpp +@@ -391,9 +391,21 @@ void ImportImageDlg::renderPixmap() + QProgressDialog progress(i18n("Rendering preview"), i18n("Cancel"), 0, pixelCount, this); + progress.setWindowModality(Qt::WindowModal); + ++/* ++ * ImageMagick prior to V7 used matte (opacity) to determine if an image has transparency. ++ * 0.0 for transparent to 1.0 for opaque ++ * ++ * ImageMagick V7 now uses alpha (transparency). ++ * 1.0 for transparent to 0.0 for opaque ++ * ++ * Access to pixels has changed too, V7 can use pixelColor to access the color of a particular ++ * pixel, but although this was available in V6, it doesn't appear to produce the same result ++ * and has resulted in black images when importing. ++ */ + #if MagickLibVersion < 0x700 + bool hasTransparency = m_convertedImage.matte(); + double transparent = 1.0; ++ const Magick::PixelPacket *pixels = m_convertedImage.getConstPixels(0, 0, width, height); + #else + bool hasTransparency = m_convertedImage.alpha(); + double transparent = 0.0; +@@ -408,7 +420,11 @@ void ImportImageDlg::renderPixmap() + } + + for (int dx = 0 ; dx < width ; dx++) { ++#if MagickLibVersion < 0x700 ++ Magick::ColorRGB rgb = Magick::Color(*pixels++); ++#else + Magick::ColorRGB rgb = m_convertedImage.pixelColor(dx, dy); ++#endif + + if (hasTransparency && (rgb.alpha() == transparent)) { + //ignore this pixel as it is transparent +diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp +index 1f12f5b..ecf552a 100644 +--- a/src/MainWindow.cpp ++++ b/src/MainWindow.cpp +@@ -541,13 +541,26 @@ void MainWindow::convertImage(const QString &source) + + bool useFractionals = importImageDlg->useFractionals(); + ++/* ++ * ImageMagick prior to V7 used matte (opacity) to determine if an image has transparency. ++ * 0.0 for transparent to 1.0 for opaque ++ * ++ * ImageMagick V7 now uses alpha (transparency). ++ * 1.0 for transparent to 0.0 for opaque ++ * ++ * Access to pixels has changed too, V7 can use pixelColor to access the color of a particular ++ * pixel, but although this was available in V6, it doesn't appear to produce the same result ++ * and has resulted in black images when importing. ++ */ + #if MagickLibVersion < 0x700 + bool hasTransparency = convertedImage.matte(); + double transparent = 1.0; ++ const Magick::PixelPacket *pixels = convertedImage.getConstPixels(0, 0, imageWidth, imageHeight); + #else + bool hasTransparency = convertedImage.alpha(); + double transparent = 0.0; + #endif ++ + bool ignoreColor = importImageDlg->ignoreColor(); + Magick::Color ignoreColorValue = importImageDlg->ignoreColorValue(); + +@@ -579,7 +592,11 @@ void MainWindow::convertImage(const QString &source) + } + + for (int dx = 0 ; dx < imageWidth ; dx++) { ++#if MagickLibVersion < 0x700 ++ Magick::ColorRGB rgb = Magick::Color(*pixels++); // is this a memory leak ++#else + Magick::ColorRGB rgb = convertedImage.pixelColor(dx, dy); ++#endif + + if (hasTransparency && (rgb.alpha() == transparent)) { + // ignore this pixel as it is transparent +-- +cgit v1.1 diff --git a/media-gfx/kxstitch/kxstitch-2.1.1-r1.ebuild b/media-gfx/kxstitch/kxstitch-2.1.1-r2.ebuild index bf995e2e238c..232c67d1a141 100644 --- a/media-gfx/kxstitch/kxstitch-2.1.1-r1.ebuild +++ b/media-gfx/kxstitch/kxstitch-2.1.1-r2.ebuild @@ -40,4 +40,7 @@ RDEPEND="${DEPEND} !media-gfx/kxstitch:4 " -PATCHES=( "${FILESDIR}/${P}-qt-5.11.patch" ) +PATCHES=( + "${FILESDIR}/${P}-qt-5.11.patch" + "${FILESDIR}/${P}-imagemagick-fix.patch" +) |