diff options
author | Kristian Fiskerstrand <k_f@gentoo.org> | 2019-05-27 15:13:10 +0200 |
---|---|---|
committer | Kristian Fiskerstrand <k_f@gentoo.org> | 2019-05-27 15:13:47 +0200 |
commit | 0d906a3b88ab0f31370c7595f8093765b9f0791d (patch) | |
tree | 86860b0f01e3faaac7afd432b667b10478918ad1 /gnome-extra/cinnamon/files | |
parent | app-emulation/winetricks: Sync with ::wine (diff) | |
download | gentoo-0d906a3b88ab0f31370c7595f8093765b9f0791d.tar.gz gentoo-0d906a3b88ab0f31370c7595f8093765b9f0791d.tar.bz2 gentoo-0d906a3b88ab0f31370c7595f8093765b9f0791d.zip |
gnome-extra/cinnamon: Add fix for pillow >= 6.0.0
Closes: https://bugs.gentoo.org/684158
Signed-off-by: Kristian Fiskerstrand <k_f@gentoo.org>
Package-Manager: Portage-2.3.66, Repoman-2.3.11
Diffstat (limited to 'gnome-extra/cinnamon/files')
-rw-r--r-- | gnome-extra/cinnamon/files/cinnamon-4.0-fix-pillow-settings.patch | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/gnome-extra/cinnamon/files/cinnamon-4.0-fix-pillow-settings.patch b/gnome-extra/cinnamon/files/cinnamon-4.0-fix-pillow-settings.patch new file mode 100644 index 000000000000..e06c86b8f3d5 --- /dev/null +++ b/gnome-extra/cinnamon/files/cinnamon-4.0-fix-pillow-settings.patch @@ -0,0 +1,43 @@ +--- files/usr/share/cinnamon/cinnamon-settings/bin/imtools.py.orig 2019-03-21 16:46:14 UTC ++++ files/usr/share/cinnamon/cinnamon-settings/bin/imtools.py +@@ -620,31 +620,6 @@ def has_transparency(image): + has_alpha(image) + + +-if Image.VERSION == '1.1.7': +- +- def split(image): +- """Work around for bug in Pil 1.1.7 +- +- :param image: input image +- :type image: PIL image object +- :returns: the different color bands of the image (eg R, G, B) +- :rtype: tuple +- """ +- image.load() +- return image.split() +-else: +- +- def split(image): +- """Work around for bug in Pil 1.1.7 +- +- :param image: input image +- :type image: PIL image object +- :returns: the different color bands of the image (eg R, G, B) +- :rtype: tuple +- """ +- return image.split() +- +- + def get_alpha(image): + """Gets the image alpha band. Can handles P mode images with transpareny. + Returns a band with all values set to 255 if no alpha band exists. +@@ -655,7 +630,7 @@ def get_alpha(image): + :rtype: single band image object + """ + if has_alpha(image): +- return split(image)[-1] ++ return image.split()[-1] + if image.mode == 'P' and 'transparency' in image.info: + return image.convert('RGBA').split()[-1] + # No alpha layer, create one. |