Accepting request 319210 from home:winski:python

update to 2.9.0: bug fixes (including memory leak), added features & upstream merge of all outstanding patches

OBS-URL: https://build.opensuse.org/request/show/319210
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Pillow?expand=0&rev=37
This commit is contained in:
Todd R 2015-07-29 09:54:54 +00:00 committed by Git OBS Bridge
parent 1c876d2161
commit 78447fef38
6 changed files with 44 additions and 63 deletions

View File

@ -1,42 +0,0 @@
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)

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8760c118a0215eba163f7782110e7efcdbb15f8a7321f3f61c5ac0dbbb12c996
size 8959431

3
Pillow-2.9.0.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0f179d7e75e7c83b6341b9595ca1f394de7081484a9e352ad66d553a1c3daa29
size 9289617

View File

@ -1,13 +0,0 @@
Index: Pillow-2.8.1/Tests/test_imagefont.py
===================================================================
--- Pillow-2.8.1.orig/Tests/test_imagefont.py
+++ Pillow-2.8.1/Tests/test_imagefont.py
@@ -126,7 +126,7 @@ try:
target = 'Tests/images/rectangle_surrounding_text.png'
target_img = Image.open(target)
- self.assert_image_equal(im, target_img)
+ self.assert_image_similar(im, target_img, .5)
def test_render_multiline(self):
im = Image.new(mode='RGB', size=(300, 100))

View File

@ -1,3 +1,43 @@
-------------------------------------------------------------------
Wed Jul 29 07:19:04 UTC 2015 - jacobwinski@gmail.com
- Update to 2.9.0:
* Added test for GimpPaletteFile #1324
* Fixed ValueError in Python 2.6 #1315 #1316
* Fixed tox test script path #1308
* Added width and height properties #1304
* Update tiff and tk tcl 8.5 versions #1303
* Add functions to convert: Image <-> QImage; Image <-> QPixmap #1217
* Remove duplicate code in gifmaker script #1294
* Multiline text in ImageDraw #1177
* Automated Windows CI/build support #1278
* Removed support for Tk versions earlier than 8.4 #1288
* Fixed polygon edge drawing #1255 (fixes #1252)
* Check prefix length in _accept methods #1267
* Register MIME type for BMP #1277
* Adjusted ImageQt use of unicode() for 2/3 compatibility #1218
* Identify XBM file created with filename including underscore #1230 (fixes #1229)
* Copy image when saving in GifImagePlugin #1231 (fixes #718)
* Removed support for FreeType 2.0 #1247
* Added background saving to GifImagePlugin #1273
* Provide n_frames attribute to multi-frame formats #1261
* Add duration and loop set to GifImagePlugin #1172, #1269
* Ico files are little endian #1232
* Upgrade olefile from 0.30 to 0.42b #1226
* Setting transparency value to 0 when the tRNS contains only null byte(s) #1239
* Separated out feature checking from selftest #1233
* Style/health fixes
* Update WebP from 0.4.1 to 0.4.3 #1235
* Release GIL during image load (decode) #1224
* Added icns save #1185
* Fix putdata memory leak #1196
* Keep user-specified ordering of icon sizes #1193
* Tiff: allow writing floating point tag values #1113
- Update to 2.8.2:
* Bug fix: Fixed Tiff handling of bad EXIF data
- Remove 0001-Ico-files-are-little-endian-ref-1204.patch: merged upstream
- Remove fix-textsize-equal.patch: merged upstream
-------------------------------------------------------------------
Mon Jul 27 08:55:33 UTC 2015 - seife+obs@b1-systems.com

View File

@ -17,15 +17,13 @@
Name: python-Pillow
Version: 2.8.1
Version: 2.9.0
Release: 0
Summary: Python Imaging Library (Fork)
License: HPND
Group: Development/Languages/Python
Url: http://python-imaging.github.io/
Source: https://pypi.python.org/packages/source/P/Pillow/Pillow-%{version}.tar.gz
Patch1: fix-textsize-equal.patch
Patch2: 0001-Ico-files-are-little-endian-ref-1204.patch
BuildRequires: python-devel
BuildRequires: python-setuptools
BuildRequires: python-tk
@ -93,8 +91,6 @@ Python Imaging Library by Fredrik Lundh and Contributors.
%prep
%setup -q -n Pillow-%{version}
%patch1 -p1
%patch2 -p1
%build
python setup.py build