summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhobosK <phobosk@fastmail.fm>2017-04-10 13:21:08 -0400
committerGöktürk Yüksek <gokturk@gentoo.org>2017-04-10 13:23:57 -0400
commit9de54ce8fad5b6aeb7d5b8da6115ae50f8cfee00 (patch)
tree573b8384e5871f46d936846482b69291ac3b0daa /media-video/photofilmstrip/files
parentvirtual/wine: Virtual for multislot/split wine. (diff)
downloadgentoo-9de54ce8fad5b6aeb7d5b8da6115ae50f8cfee00.tar.gz
gentoo-9de54ce8fad5b6aeb7d5b8da6115ae50f8cfee00.tar.bz2
gentoo-9de54ce8fad5b6aeb7d5b8da6115ae50f8cfee00.zip
media-video/photofilmstrip: fix tostring() runtime exception #584128
Thanks to Cyril42e for the initial patch. Package-Manager: Portage-2.3.3, Repoman-2.3.2
Diffstat (limited to 'media-video/photofilmstrip/files')
-rw-r--r--media-video/photofilmstrip/files/photofilmstrip-2.1.0-PIL_tostring_fix.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/media-video/photofilmstrip/files/photofilmstrip-2.1.0-PIL_tostring_fix.patch b/media-video/photofilmstrip/files/photofilmstrip-2.1.0-PIL_tostring_fix.patch
new file mode 100644
index 000000000000..dc29c9c8e14f
--- /dev/null
+++ b/media-video/photofilmstrip/files/photofilmstrip-2.1.0-PIL_tostring_fix.patch
@@ -0,0 +1,35 @@
+Gentoo-Bug: https://bugs.gentoo.org/584128
+
+--- a/photofilmstrip/core/ProjectFile.py
++++ b/photofilmstrip/core/ProjectFile.py
+@@ -196,7 +196,7 @@
+ def __ThumbToQuery(self, picId, pic):
+ pilThumb = PILBackend.GetThumbnail(pic, height=120)
+ thumbWidth, thumbHeight = pilThumb.size
+- thumbData = buffer(pilThumb.tostring())
++ thumbData = buffer(pilThumb.tobytes())
+
+ query = "INSERT INTO `thumbnail` (" \
+ "picture_id, width, height, data" \
+--- a/photofilmstrip/core/renderer/CairoRenderer.py
++++ b/photofilmstrip/core/renderer/CairoRenderer.py
+@@ -121,7 +121,7 @@
+ def _PilToCairo(self, pilImg):
+ pilImg = pilImg.copy()
+ w, h = pilImg.size
+- data = pilImg.convert('RGBA').tostring()
++ data = pilImg.convert('RGBA').tobytes()
+ buff = array.array('B', data)
+ cairoImage = cairo.ImageSurface.create_for_data(buff, cairo.FORMAT_ARGB32, w, h)
+ # cairoImage = cairo.ImageSurface.create_for_data(buff, cairo.FORMAT_RGB24, w, h)
+--- a/photofilmstrip/core/renderer/PyGameRenderer.py
++++ b/photofilmstrip/core/renderer/PyGameRenderer.py
+@@ -100,7 +100,7 @@
+ def _PilToPyGame(self, pilImg):
+ mode = pilImg.mode
+ assert mode in "RGB", "RGBA"
+- return pygame.image.fromstring(pilImg.tostring(), pilImg.size, mode)
++ return pygame.image.frombytes(pilImg.tobytes(), pilImg.size, mode)
+
+
+ # def CropAndResize(self, ctx, rect):