forked from pool/python-Pillow
Accepting request 312960 from devel:languages:python
Automatic submission by obs-autosubmit OBS-URL: https://build.opensuse.org/request/show/312960 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-Pillow?expand=0&rev=15
This commit is contained in:
commit
29456a55d1
42
0001-Ico-files-are-little-endian-ref-1204.patch
Normal file
42
0001-Ico-files-are-little-endian-ref-1204.patch
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
From 93461e6faa9a5a2676101394bd2fae68040f6b53 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Eric Soroos <eric-github@soroos.net>
|
||||||
|
Date: Wed, 13 May 2015 03:05:45 -0700
|
||||||
|
Subject: [PATCH] Ico files are little endian, ref #1204
|
||||||
|
|
||||||
|
---
|
||||||
|
PIL/IcoImagePlugin.py | 8 ++++----
|
||||||
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
Index: Pillow-2.8.1/PIL/IcoImagePlugin.py
|
||||||
|
===================================================================
|
||||||
|
--- Pillow-2.8.1.orig/PIL/IcoImagePlugin.py
|
||||||
|
+++ Pillow-2.8.1/PIL/IcoImagePlugin.py
|
||||||
|
@@ -49,7 +49,7 @@ def _save(im, fp, filename):
|
||||||
|
filter(lambda x: False if (x[0] > width or x[1] > height or
|
||||||
|
x[0] > 255 or x[1] > 255) else True, sizes)
|
||||||
|
sizes = sorted(sizes, key=lambda x: x[0])
|
||||||
|
- fp.write(struct.pack("H", len(sizes))) # idCount(2)
|
||||||
|
+ fp.write(struct.pack("<H", len(sizes))) # idCount(2)
|
||||||
|
offset = fp.tell() + len(sizes)*16
|
||||||
|
for size in sizes:
|
||||||
|
width, height = size
|
||||||
|
@@ -58,7 +58,7 @@ def _save(im, fp, filename):
|
||||||
|
fp.write(b"\0") # bColorCount(1)
|
||||||
|
fp.write(b"\0") # bReserved(1)
|
||||||
|
fp.write(b"\0\0") # wPlanes(2)
|
||||||
|
- fp.write(struct.pack("H", 32)) # wBitCount(2)
|
||||||
|
+ fp.write(struct.pack("<H", 32)) # wBitCount(2)
|
||||||
|
|
||||||
|
image_io = BytesIO()
|
||||||
|
tmp = im.copy()
|
||||||
|
@@ -67,8 +67,8 @@ def _save(im, fp, filename):
|
||||||
|
image_io.seek(0)
|
||||||
|
image_bytes = image_io.read()
|
||||||
|
bytes_len = len(image_bytes)
|
||||||
|
- fp.write(struct.pack("I", bytes_len)) # dwBytesInRes(4)
|
||||||
|
- fp.write(struct.pack("I", offset)) # dwImageOffset(4)
|
||||||
|
+ fp.write(struct.pack("<I", bytes_len)) # dwBytesInRes(4)
|
||||||
|
+ fp.write(struct.pack("<I", offset)) # dwImageOffset(4)
|
||||||
|
current = fp.tell()
|
||||||
|
fp.seek(offset)
|
||||||
|
fp.write(image_bytes)
|
@ -1,8 +1,8 @@
|
|||||||
Index: Pillow-2.7.0/Tests/test_imagefont.py
|
Index: Pillow-2.8.1/Tests/test_imagefont.py
|
||||||
===================================================================
|
===================================================================
|
||||||
--- Pillow-2.7.0.orig/Tests/test_imagefont.py
|
--- Pillow-2.8.1.orig/Tests/test_imagefont.py
|
||||||
+++ Pillow-2.7.0/Tests/test_imagefont.py
|
+++ Pillow-2.8.1/Tests/test_imagefont.py
|
||||||
@@ -108,7 +108,7 @@ try:
|
@@ -126,7 +126,7 @@ try:
|
||||||
|
|
||||||
target = 'Tests/images/rectangle_surrounding_text.png'
|
target = 'Tests/images/rectangle_surrounding_text.png'
|
||||||
target_img = Image.open(target)
|
target_img = Image.open(target)
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Jun 13 19:02:32 UTC 2015 - dmueller@suse.com
|
||||||
|
|
||||||
|
- add 0001-Ico-files-are-little-endian-ref-1204.patch: fix for s390x
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Apr 22 08:55:10 UTC 2015 - mcihar@suse.cz
|
Wed Apr 22 08:55:10 UTC 2015 - mcihar@suse.cz
|
||||||
|
|
||||||
|
@ -25,6 +25,7 @@ Group: Development/Languages/Python
|
|||||||
Url: http://python-imaging.github.io/
|
Url: http://python-imaging.github.io/
|
||||||
Source: https://pypi.python.org/packages/source/P/Pillow/Pillow-%{version}.tar.gz
|
Source: https://pypi.python.org/packages/source/P/Pillow/Pillow-%{version}.tar.gz
|
||||||
Patch1: fix-textsize-equal.patch
|
Patch1: fix-textsize-equal.patch
|
||||||
|
Patch2: 0001-Ico-files-are-little-endian-ref-1204.patch
|
||||||
BuildRequires: python-devel
|
BuildRequires: python-devel
|
||||||
BuildRequires: python-setuptools
|
BuildRequires: python-setuptools
|
||||||
BuildRequires: python-tk
|
BuildRequires: python-tk
|
||||||
@ -87,6 +88,7 @@ Python Imaging Library by Fredrik Lundh and Contributors.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q -n Pillow-%{version}
|
%setup -q -n Pillow-%{version}
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
|
%patch2 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
python setup.py build
|
python setup.py build
|
||||||
|
Loading…
Reference in New Issue
Block a user