diff options
Diffstat (limited to 'media-gfx/cropgui/files')
-rw-r--r-- | media-gfx/cropgui/files/cropgui-0.1.1-PIL.patch | 29 | ||||
-rw-r--r-- | media-gfx/cropgui/files/cropgui-0.2-PIL.patch | 26 | ||||
-rw-r--r-- | media-gfx/cropgui/files/cropgui-0.2-tobytes.patch | 40 |
3 files changed, 95 insertions, 0 deletions
diff --git a/media-gfx/cropgui/files/cropgui-0.1.1-PIL.patch b/media-gfx/cropgui/files/cropgui-0.1.1-PIL.patch new file mode 100644 index 000000000000..88f7ffbfed81 --- /dev/null +++ b/media-gfx/cropgui/files/cropgui-0.1.1-PIL.patch @@ -0,0 +1,29 @@ +Только в cropgui: cropgui-0.1.1-PIL.patch +diff -ru cropgui.orig/cropgui_common.py cropgui/cropgui_common.py +--- cropgui.orig/cropgui_common.py 2009-07-24 06:15:12.000000000 +0400 ++++ cropgui/cropgui_common.py 2013-05-28 21:48:24.000000000 +0400 +@@ -13,9 +13,9 @@ + # You should have received a copy of the GNU General Public License + # along with this program; if not, write to the Free Software + # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-import Image +-import ImageFilter +-import ImageDraw ++from PIL import Image ++from PIL import ImageFilter ++from PIL import ImageDraw + import subprocess + import threading + import Queue +diff -ru cropgui.orig/filechooser.py cropgui/filechooser.py +--- cropgui.orig/filechooser.py 2009-07-24 06:15:12.000000000 +0400 ++++ cropgui/filechooser.py 2013-05-28 21:50:16.000000000 +0400 +@@ -8,7 +8,7 @@ + import gobject + + import os +-import Image ++from PIL import Image + + HIGH_WATER, LOW_WATER = 25, 5 + image_cache = {} diff --git a/media-gfx/cropgui/files/cropgui-0.2-PIL.patch b/media-gfx/cropgui/files/cropgui-0.2-PIL.patch new file mode 100644 index 000000000000..3c1e91847f8e --- /dev/null +++ b/media-gfx/cropgui/files/cropgui-0.2-PIL.patch @@ -0,0 +1,26 @@ +--- cropgui.orig/cropgui_common.py 2016-01-28 12:54:47.424636620 +0300 ++++ cropgui/cropgui_common.py 2016-01-28 12:55:15.176635735 +0300 +@@ -13,9 +13,9 @@ + # You should have received a copy of the GNU General Public License + # along with this program; if not, write to the Free Software + # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-import Image +-import ImageFilter +-import ImageDraw ++from PIL import Image ++from PIL import ImageFilter ++from PIL import ImageDraw + import subprocess + import threading + import Queue +--- cropgui.orig/filechooser.py 2016-01-28 12:55:26.505635374 +0300 ++++ cropgui/filechooser.py 2016-01-28 12:55:32.649635178 +0300 +@@ -8,7 +8,7 @@ + import gobject + + import os +-import Image ++from PIL import Image + import cropgui_common + + def apply_rotation(rotation, image): diff --git a/media-gfx/cropgui/files/cropgui-0.2-tobytes.patch b/media-gfx/cropgui/files/cropgui-0.2-tobytes.patch new file mode 100644 index 000000000000..18405143badf --- /dev/null +++ b/media-gfx/cropgui/files/cropgui-0.2-tobytes.patch @@ -0,0 +1,40 @@ +commit b664d1fefd7140ec4ec37b3b90a9007839029d8a +Author: Tristan Stenner <ttstenner@gmail.com> +Date: Fri Oct 9 08:40:04 2015 +0200 + + Try tostring(), fall back to tobytes() + +diff --git a/cropgtk.py b/cropgtk.py +index c1156b0..135b6a8 100755 +--- a/cropgtk.py ++++ b/cropgtk.py +@@ -170,7 +170,11 @@ class DragManager(DragManagerBase): + rendered = self.rendered() + rendered = rendered.convert('RGB') + i.set_size_request(*rendered.size) +- pixbuf = gtk.gdk.pixbuf_new_from_data(rendered.tostring(), ++ try: ++ image_data = rendered.tostring() ++ except: ++ image_data = rendered.tobytes() ++ pixbuf = gtk.gdk.pixbuf_new_from_data(image_data, + gtk.gdk.COLORSPACE_RGB, 0, 8, + rendered.size[0], rendered.size[1], 3*rendered.size[0]) + +diff --git a/filechooser.py b/filechooser.py +index f2f8122..a039d74 100644 +--- a/filechooser.py ++++ b/filechooser.py +@@ -49,7 +49,11 @@ def update_preview_cb(file_chooser, preview): + i.thumbnail((PREVIEW_SIZE, PREVIEW_SIZE), Image.ANTIALIAS) + i = i.convert('RGB') + i = apply_rotation(r, i) +- pixbuf = gtk.gdk.pixbuf_new_from_data(i.tostring(), ++ try: ++ image_data = i.tostring() ++ except: ++ image_data = i.tobytes() ++ pixbuf = gtk.gdk.pixbuf_new_from_data(image_data, + gtk.gdk.COLORSPACE_RGB, 0, 8, i.size[0], i.size[1], + i.size[0]*3) + preview.set_from_pixbuf(pixbuf) |