From cb4eafec17a123f8686f60eb61ba6a18f050b47c Mon Sep 17 00:00:00 2001 From: Alex Clark Date: Fri, 27 Sep 2013 17:10:38 -0400 Subject: [PATCH 01/66] Py3 compat --- setup.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/setup.py b/setup.py index 3bd822bf6..d1361890a 100644 --- a/setup.py +++ b/setup.py @@ -169,12 +169,13 @@ class pil_build_ext(build_ext): # freetype2 ships with X11 _add_directory(library_dirs, "/usr/X11/lib") _add_directory(include_dirs, "/usr/X11/include") - # if brew is installed, use its lib and include directories - import commands - status, homebrew = commands.getstatusoutput('brew --prefix') - if status == 0: - _add_directory(library_dirs, os.path.join(homebrew, 'lib')) - _add_directory(include_dirs, os.path.join(homebrew, 'include')) + # if homebrew is installed, use its lib and include directories + import subprocess + prefix = subprocess.check_output(['brew', '--prefix']) + if prefix: + prefix = prefix.strip() + _add_directory(library_dirs, os.path.join(prefix, 'lib')) + _add_directory(include_dirs, os.path.join(prefix, 'include')) elif sys.platform.startswith("linux"): for platform_ in (plat.processor(), plat.architecture()[0]): From 4983f6da77a3fe0e253a1a1bea44491f80c4b7bd Mon Sep 17 00:00:00 2001 From: Christoph Gohlke Date: Fri, 27 Sep 2013 15:03:27 -0700 Subject: [PATCH 02/66] BUG: add typedef uint64_t for msvc --- libImaging/QuantTypes.h | 1 + 1 file changed, 1 insertion(+) diff --git a/libImaging/QuantTypes.h b/libImaging/QuantTypes.h index 8f113b082..411485498 100644 --- a/libImaging/QuantTypes.h +++ b/libImaging/QuantTypes.h @@ -14,6 +14,7 @@ #ifdef _MSC_VER typedef unsigned __int32 uint32_t; +typedef unsigned __int64 uint64_t; #else #include #endif From 172e0d8bdb01ae6026e35523aa1bfb9dfb3d0d24 Mon Sep 17 00:00:00 2001 From: Alex Clark Date: Fri, 27 Sep 2013 18:13:39 -0400 Subject: [PATCH 03/66] Add history --- CHANGES.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 80e12e0a2..9e50f4036 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,6 +4,9 @@ Changelog (Pillow) 2.2.0 (2013-10-01) ------------------ +- Add typedef uint64_t for MSVC. + [cgohlke] + - Fix #329: setup.py: better support for C_INCLUDE_PATH, LD_RUN_PATH, etc. [nu774] From 86345d08d089c5b138ab46cf206edf66b4e96d98 Mon Sep 17 00:00:00 2001 From: Christoph Gohlke Date: Fri, 27 Sep 2013 15:51:53 -0700 Subject: [PATCH 04/66] TST: fix TypeError: string argument expected, got 'bytes' on Py3 --- Tests/test_file_webp_metadata.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Tests/test_file_webp_metadata.py b/Tests/test_file_webp_metadata.py index a9c566cf4..031865bd7 100644 --- a/Tests/test_file_webp_metadata.py +++ b/Tests/test_file_webp_metadata.py @@ -9,10 +9,6 @@ try: except: skip('webp support not installed') -try: - from StringIO import StringIO -except ImportError: - from io import StringIO def test_read_exif_metadata(): @@ -40,7 +36,7 @@ def test_write_exif_metadata(): image = Image.open(file_path) expected_exif = image.info['exif'] - buffer = StringIO() + buffer = BytesIO() image.save(buffer, "webp", exif=expected_exif) @@ -73,7 +69,7 @@ def test_write_icc_metadata(): image = Image.open(file_path) expected_icc_profile = image.info['icc_profile'] - buffer = StringIO() + buffer = BytesIO() image.save(buffer, "webp", icc_profile=expected_icc_profile) From ada10a0ba4a9d61e10f6c2e098c68f088c235a86 Mon Sep 17 00:00:00 2001 From: Christoph Gohlke Date: Fri, 27 Sep 2013 16:35:37 -0700 Subject: [PATCH 05/66] Circumvent classification of pngtest_bad.png as malware --- Tests/images/pngtest_bad.png.base64 | 151 ---------------------------- Tests/images/pngtest_bad.png.bin | Bin 0 -> 8573 bytes 2 files changed, 151 deletions(-) delete mode 100644 Tests/images/pngtest_bad.png.base64 create mode 100644 Tests/images/pngtest_bad.png.bin diff --git a/Tests/images/pngtest_bad.png.base64 b/Tests/images/pngtest_bad.png.base64 deleted file mode 100644 index 44e85d644..000000000 --- a/Tests/images/pngtest_bad.png.base64 +++ /dev/null @@ -1,151 +0,0 @@ -iVBORw0KGgoAAAANSUhEUgAAAFsAAABFCAMAAAFlM1rWAAACAHRSTlMAALGPC/xhBQAAAARzQklU -BQUFBU2lLfYAAAAGYktHRADgAOAAgJXNLyAAAAAJb0ZGcwAAAAAAAAAAAa0thlgAAAAscENBTGJv -Z3VzIHVuaXRzAAAAAAAAAP//AAJmb28vYmFyADEuMGUwADY1LjUzNWUzV0B7HAAAAAlwSFlzAAAL -EgAACxIB0t1+/AAAAAd0SU1FB8wGBxE6CI7/JnoAAAAJdEVYdFRpdGxlAFBOR9wBeTUAAB+3SURB -VHic7ZxPaGTJnec/OZOC3wMJIsCCF4YyxEAPPMEaUgdD5oIPueABFcwhBWuo2pvmMFB9U82p+7AD -5Zvq1nUYsOamOhiUQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFB -QUFBMyPj/SLi9+f7+/4e/CFkWNjVz4+GK4C/ePXN9RsHPbsC+ORouMqVMJ46ALoAD4bFeeXr0bBn -GF+6pyLkAjzoFyujhOezsgOQK+n/BcDzSXmYK01hDErk+MnDoXehHgPEmH7toGdXVYizzZRCjJSu -JsugdJ6j4f7IVTV1jBgtKJHrKQH42DB1FQA9q/jwdNIBqD6Nx6N9ewLx9s0+GharB8NiBfDRqLdK -X8xHb1TdWjvfrfzrR6PVsMhXAH95840no/75pPzyFwBnxwerefnFzucvXwyWy4x8Rz7r3JzzzHmK -3PD4+aQzPTlanU8umZRuNndhAK0aq/pahb52/N9PT1azyRRjBON13/T0aljk1zoHMFq48jU/e3o6 -bhpGoV2gpoGeNWmT5TqjXTD2jOZ0Uh4O9wwXc9fpF4ZIZO7C9R2P2h14fnzwRp3/BUBsfw7g8OlF -59uq+Z1FhLyXq9FBz/r1/3Xf9oW75JOj4SoCj9tNenTQWznnUZIhIsQbm/XWKT0/Plh9cjRcnTy4 -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-sU4Jkt23ykzLajr39fm3oVm+V6VGMhwxJQvGCGQGIWXO6waBm4omS0ctZVcgUZg7P75Jft2MLeSh -fdyRtAtT14nlGyP4OrwG7NwlF3P3+NL5848PB9MQIoXNB7Py2z1LIUSq8fy6//H578hifa9u0tLX -3rcPOYmtPbsBGaSuPZLSc5PSZZF1b03kdDI3dyk6V9J/OCj8GoNY4y9aC6bd4dUdT8p4k1Qhzj48 -nXTqGCst72ZKvgt5r51d19FZlVhAVgl5lnHVXHeQWKOQ1s5WIZHlqxCZXLrDux4rAknR9/ft1Lbt -BXVMRdhLX28Kq1f+zVTvt8mHpxPzzZ/67uQ9zYhsTIhrHYZpn+uyVrJvqzURwdXhVqfvq5Ir6R8N -i2lG8uoA00s/1hlMrvxZjNHf1W/6pyrv5SBtrvqfHA2nrt3ZpY8onRDBECO+iZg2jX9TmPafWd45 -qelZdXL8N/unLxcRI5KA96+XCfwHdncFlsvZ51/Uvxj/+jf/NS6XX/4B5/0nKd+4s0d9ez6w+cjo -DFc3s0tXTeeuPvchuLdRDf4sr8v/A0hBK/T1IM6VAAAAxnpUWHREZXNjcmlwdGlvbgAAeJxNy0FK -xEAQBdB9TvGXCjNhQPAE4k4d4hDXPd0/SUFS1XRVRnJ7t779G6iFjQX3A1c2Fw9qJmzCKC6meIrt -GUM6cGsps3Ujm4spXvrLCbuLzoiFuMlGxyd/MdiWFJNpIGnB28f7j1l57btv0Uxcv8bzkA4Uo0Mt -UKQxr3HA91qtBUSDbU2ZBbZH3ePUxSKOSVZiSY47qcimD7ZgQRiS/l+ypZl4SELqqnmca7NMd9EZ -Hqz9H24IVyP3c8UAAAAAAElFTkSuQmCC diff --git a/Tests/images/pngtest_bad.png.bin b/Tests/images/pngtest_bad.png.bin new file mode 100644 index 0000000000000000000000000000000000000000..07a74a104cd5bc71779be6fe61d614ae7d30c09e GIT binary patch literal 8573 zcmb7pg;!h86E9MSxN5WW3T_%Tyb!+qftSzZ`Nne+7iGXciX~G1%-jj*9(|;t8 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z!M;@ykKP$lyAi2A=SY{*^>h8p7LX#vScTVFS;W2 zJ9M%pHM)TljH;=we-ksebcY^DC0(BHzd{W=@zcQ2CxZUn+Rn;UIDn3peeH-`<2T8dTP~LLMV@IqrPhG-*&B)fokH`W-n%ETK3`M5X#;i@Y|dvLvnIJfZ)!}PkW^kNN~TP>BJzDRE{5uB;U73 zBBzBqFOFhaXb&C3CSy&%(--z6GvR$*SeF(*7zmtCVY)#VFi7Pr-pv+x^wbyl#`UF$EXAvUykkvtVQ8PhrgW?9ybW%fjF98A~SW#yDjj2%iHQh%-d-}eXKYxZ3~(u$l}a~{b0zD6x31qmO)*^&59gB6i&C}nl4N;W_eK}(2W z3JM>4t7EUj=4|u>9ba{@c&(lR|7bpn+_nP%-51~0ez+!k8KPV%LO;wTCLi^>1A7WA{ zW&gz(-t|1cg@oFtpJpOA7+9`A&G>r@tTe8dSL2w|crtMV8^rm~OJp`_DvPDb7;{9^Z7}-=>E@ z0}?h$$A>Z;x-nzRQ;yd~T!$Mk z?aQwpBdDl+ajqbqBa6J9oCOv6LnJof(~pZB-KBTMXk9m#ThW^$ei{mv#K6mnRH9n~ zcMrUjfw?W{WGn5%wdjK|Un=w-d+Uy!bGe~L(a%S+64SR$qAgmZstwsHm%Ict)PEqo z=cyQYz*UmwK0ALoocze^_jqgSz~n4k&0K7pU^b2pSXiE!kO66xuJ`14qkd|~sl;zg z-XA?#RbyNwpOILUQkMQW1=CV+@u^4MG5iXR#k<7S7NH@tW&6^>!B^-RwNEDtaSA$?TMPW!lw% gJ;vym%I=sQ2(?)*UArG0!opIPSCcE3G5-300BtGKl>h($ literal 0 HcmV?d00001 From fb80d5b2673cf24435157c31ce61010de4fa5ff8 Mon Sep 17 00:00:00 2001 From: Christoph Gohlke Date: Fri, 27 Sep 2013 16:55:19 -0700 Subject: [PATCH 06/66] Circumvent classification of pngtest_bad.png as malware --- Tests/test_file_png.py | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/Tests/test_file_png.py b/Tests/test_file_png.py index 067ea5812..5ae726ad8 100644 --- a/Tests/test_file_png.py +++ b/Tests/test_file_png.py @@ -212,18 +212,14 @@ def test_roundtrip_text(): def test_scary(): # Check reading of evil PNG file. For information, see: # http://scary.beasts.org/security/CESA-2004-001.txt + # The first byte is removed from pngtest_bad.png + # to avoid classification as malware. - import base64 - file = "Tests/images/pngtest_bad.png.base64" - data = None + with open("Tests/images/pngtest_bad.png.bin", 'rb') as fd: + data = b'\x89' + fd.read() - if py3: - data = base64.decodebytes(open(file, 'rb').read()) - else: - data = base64.decodestring(open(file, 'rb').read()) - - file = BytesIO(data) - assert_exception(IOError, lambda: Image.open(file)) + pngfile = BytesIO(data) + assert_exception(IOError, lambda: Image.open(pngfile)) def test_trns_rgb(): # Check writing and reading of tRNS chunks for RGB images. From a2cca80eae12a5bc77d682712dc6bcad0334505d Mon Sep 17 00:00:00 2001 From: Alex Clark Date: Sat, 28 Sep 2013 08:56:44 -0400 Subject: [PATCH 07/66] Test failed See: 6d8c6f582a4981c991a230502e80010caeb3e48f --- setup.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/setup.py b/setup.py index d1361890a..13429847b 100644 --- a/setup.py +++ b/setup.py @@ -587,9 +587,6 @@ setup( ext_modules=[Extension("PIL._imaging", ["_imaging.c"])], include_package_data=True, packages=find_packages(), - provides=[ - 'PIL' - ], scripts=glob.glob("Scripts/pil*.py"), keywords=["Imaging",], license='Standard PIL License', From 30eadf8e95ef69493e1ce4109cafaa673674354b Mon Sep 17 00:00:00 2001 From: Alex Clark Date: Sat, 28 Sep 2013 09:11:59 -0400 Subject: [PATCH 08/66] Add history --- CHANGES.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 9e50f4036..90fde24ce 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,6 +4,9 @@ Changelog (Pillow) 2.2.0 (2013-10-01) ------------------ +- Fix #251 and #326: circumvent classification of pngtest_bad.png as malware + [cgohlke] + - Add typedef uint64_t for MSVC. [cgohlke] From 8559fafca47b02459f9c19bc9069ff4972705f27 Mon Sep 17 00:00:00 2001 From: Alex Clark Date: Sat, 28 Sep 2013 09:19:46 -0400 Subject: [PATCH 09/66] Check-manifest fixes --- MANIFEST.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/MANIFEST.in b/MANIFEST.in index 763e36a8d..89e81bf43 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -19,3 +19,6 @@ recursive-include docs *.txt *.html *.rst *.css *.py README CHANGES CONTENTS Mak recursive-include libImaging *.c *.h recursive-include Tk *.c *.txt recursive-include Sane *.c *.txt CHANGES README *.py +include .travis.yml +recursive-include docs *.gitignore +include .gitattributes From 59e3b7113fbe2fdffcefc7abaa0f7605343fff72 Mon Sep 17 00:00:00 2001 From: Alex Clark Date: Sat, 28 Sep 2013 09:20:22 -0400 Subject: [PATCH 10/66] Sort manifest --- MANIFEST.in | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index 89e81bf43..e59f60d3a 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,24 +1,24 @@ exclude .hgignore exclude .hgtags exclude BUILDME.bat -exclude make-manifest.py exclude SHIP exclude SHIP.bat -include *.rst -include *.c -include *.h -include selftest.py tox.ini -include COPYING -recursive-include Tests *.py *.txt +exclude make-manifest.py +graft Images graft Tests/fonts graft Tests/icc graft Tests/images +include *.c +include *.h +include *.rst +include .gitattributes +include .travis.yml +include COPYING +include selftest.py tox.ini +recursive-include Sane *.c *.txt CHANGES README *.py recursive-include Scripts *.py README -graft Images +recursive-include Tests *.py *.txt +recursive-include Tk *.c *.txt +recursive-include docs *.gitignore recursive-include docs *.txt *.html *.rst *.css *.py README CHANGES CONTENTS Makefile make.bat BUILDME LICENSE COPYING recursive-include libImaging *.c *.h -recursive-include Tk *.c *.txt -recursive-include Sane *.c *.txt CHANGES README *.py -include .travis.yml -recursive-include docs *.gitignore -include .gitattributes From f7393d897770a2a51f8f4f24bf0d5a4d0fb29420 Mon Sep 17 00:00:00 2001 From: Alex Clark Date: Sat, 28 Sep 2013 09:26:28 -0400 Subject: [PATCH 11/66] Add faux test suite It would be great if we could start moving PIL's tests in to a proper test suite i.e. inside a Python package --- PIL/tests.py | 17 +++++++++++++++++ setup.py | 1 + 2 files changed, 18 insertions(+) create mode 100644 PIL/tests.py diff --git a/PIL/tests.py b/PIL/tests.py new file mode 100644 index 000000000..6eccd361d --- /dev/null +++ b/PIL/tests.py @@ -0,0 +1,17 @@ +import unittest + + +class PillowTests(unittest.TestCase): + """ + Can we start moving the test suite here? + """ + + def move_test_suite_here(self): + """ + Great idea! + """ + assert True is True + + +if __name__ == '__main__': + unittest.main() diff --git a/setup.py b/setup.py index 13429847b..e5ae68303 100644 --- a/setup.py +++ b/setup.py @@ -588,6 +588,7 @@ setup( include_package_data=True, packages=find_packages(), scripts=glob.glob("Scripts/pil*.py"), + test_suite='PIL.tests', keywords=["Imaging",], license='Standard PIL License', zip_safe=True, From 2b32882a1a0e02675c34889014f3ca9e50e22ef3 Mon Sep 17 00:00:00 2001 From: Alex Clark Date: Sat, 28 Sep 2013 09:28:16 -0400 Subject: [PATCH 12/66] Add pyroma rating --- setup.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/setup.py b/setup.py index e5ae68303..aa2362f97 100644 --- a/setup.py +++ b/setup.py @@ -1,3 +1,11 @@ +# > pyroma . +# ------------------------------ +# Checking . +# Found Pillow +# ------------------------------ +# Final rating: 10/10 +# Your cheese is so fresh most people think it's a cream: Mascarpone +# ------------------------------ from __future__ import print_function import glob import os From caacc1dce6e594ae9773520a4fc26a9d14cc9b7c Mon Sep 17 00:00:00 2001 From: Alex Clark Date: Sat, 28 Sep 2013 09:46:00 -0400 Subject: [PATCH 13/66] Fix test --- PIL/tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PIL/tests.py b/PIL/tests.py index 6eccd361d..eb4a8342d 100644 --- a/PIL/tests.py +++ b/PIL/tests.py @@ -6,7 +6,7 @@ class PillowTests(unittest.TestCase): Can we start moving the test suite here? """ - def move_test_suite_here(self): + def test_suite_should_move_here(self): """ Great idea! """ From f96be4655d7b7c770c4732a11fe6d8190bbc88eb Mon Sep 17 00:00:00 2001 From: Alex Clark Date: Sat, 28 Sep 2013 09:59:18 -0400 Subject: [PATCH 14/66] Wording [ci skip] --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index b1fd352f7..d755ada66 100644 --- a/README.rst +++ b/README.rst @@ -74,7 +74,7 @@ If you don't want to help with development, you can help us financially. Your do .. Note:: New contributors: please add your name (and donation preference) here and send a pull request. -Pillow is a (labor of love) volunteer effort led by Alex Clark. Any contributor interested in receiving donations for their Pillow contributions may add their name (and donation preference) here. +Pillow is a volunteer effort led by Alex Clark. Any contributor interested in receiving donations for their Pillow contributions may add their name and donation preference here. +--------------------------------------+---------------------------------------+ | **Developer** | **Preference** | From 4f0887d251447f2369ff84fdd596f2720b68b721 Mon Sep 17 00:00:00 2001 From: Alex Clark Date: Sat, 28 Sep 2013 10:42:28 -0400 Subject: [PATCH 15/66] Wording [ci skip] --- README.rst | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/README.rst b/README.rst index d755ada66..af47d6761 100644 --- a/README.rst +++ b/README.rst @@ -58,8 +58,11 @@ Documentation The API documentation included with PIL has been converted (from HTML generated by pythondoc) to reStructured text (via pandoc) and is now `hosted by readthedocs.org `_. This is a work in progress: in order to re-generate new API documentation, either `pythondoc `_ will have to be run again or the pythondoc functionality must be converted to Sphinx. -Community ---------- +Community Support +----------------- + +Developer +~~~~~~~~~ PIL needs you! Please help us maintain the Python Imaging Library here: @@ -67,14 +70,12 @@ PIL needs you! Please help us maintain the Python Imaging Library here: - Freenode (irc://irc.freenode.net#pil) - Image-SIG (http://mail.python.org/mailman/listinfo/image-sig) -Support -~~~~~~~ +Financial +~~~~~~~~~ -If you don't want to help with development, you can help us financially. Your donation will be very much appreciated. +Pillow is a volunteer effort led by Alex Clark. If you can't help with development you can help us financially; your assistance is very much appreciated! -.. Note:: New contributors: please add your name (and donation preference) here and send a pull request. - -Pillow is a volunteer effort led by Alex Clark. Any contributor interested in receiving donations for their Pillow contributions may add their name and donation preference here. +.. Note:: Contributors: please add your name and donation preference here. +--------------------------------------+---------------------------------------+ | **Developer** | **Preference** | From 16dc69ff13d6fa39856081c57bed6e415fb02a8c Mon Sep 17 00:00:00 2001 From: Alex Clark Date: Sat, 28 Sep 2013 10:44:12 -0400 Subject: [PATCH 16/66] Wording [ci skip] --- README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index af47d6761..e23a1957a 100644 --- a/README.rst +++ b/README.rst @@ -83,8 +83,8 @@ Pillow is a volunteer effort led by Alex Clark. If you can't help with developme | Alex Clark (fork author) | http://gittip.com/aclark4life | +--------------------------------------+---------------------------------------+ -Developer ---------- +Developer Notes +--------------- .. Note:: If there is a binary package for your system, that is the easiest way to install Pillow. Currently we only provide binaries for Windows (via Python eggs). From 7554db79373c9b2456025810ddea59614792b6b2 Mon Sep 17 00:00:00 2001 From: Alex Clark Date: Sat, 28 Sep 2013 10:49:42 -0400 Subject: [PATCH 17/66] Wording [ci skip] --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index e23a1957a..47982c96b 100644 --- a/README.rst +++ b/README.rst @@ -73,7 +73,7 @@ PIL needs you! Please help us maintain the Python Imaging Library here: Financial ~~~~~~~~~ -Pillow is a volunteer effort led by Alex Clark. If you can't help with development you can help us financially; your assistance is very much appreciated! +Pillow is a volunteer effort led by Alex Clark. If you can't help with development, you can help us financially; your assistance is very much appreciated! .. Note:: Contributors: please add your name and donation preference here. From 57f40ef77a8c5bea300b76d7e0336ce2350826f7 Mon Sep 17 00:00:00 2001 From: Alex Clark Date: Sat, 28 Sep 2013 11:00:39 -0400 Subject: [PATCH 18/66] Wording [ci skip] --- README.rst | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/README.rst b/README.rst index 47982c96b..63093a47f 100644 --- a/README.rst +++ b/README.rst @@ -45,13 +45,19 @@ Installation .. Note:: PIL and Pillow currently cannot co-exist in the same environment. If you want to use Pillow, please remove PIL first. -TL;DR: - -:: +You can install Pillow with ``pip``:: $ pip install Pillow -For more information, please see http://python-imaging.github.io/ or below. +Or ``easy_install`` (for installing eggs, as pip does not support them):: + + $ easy_install Pillow + +Or download the compressed archive from PyPI, extract it, and inside it run:: + + $ python setup.py install + +For more information, please see http://pillow.readthedocs.org/en/latest/ or below. Documentation ------------- From 9cb8486581b059a1644cdb5c2adfbbcaa985cd68 Mon Sep 17 00:00:00 2001 From: Alex Clark Date: Sat, 28 Sep 2013 11:02:35 -0400 Subject: [PATCH 19/66] Bump all the things --- docs/conf.py | 4 ++-- setup.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 7d9b76698..972984f82 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,9 +48,9 @@ copyright = u'1997-2011 by Secret Labs AB, 1995-2011 by Fredrik Lundh, 2010-2013 # built documents. # # The short X.Y version. -version = '2.1.0' +version = '2.2.0' # The full version, including alpha/beta/rc tags. -release = '2.1.0' +release = '2.2.0' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/setup.py b/setup.py index aa2362f97..0d2d80c35 100644 --- a/setup.py +++ b/setup.py @@ -82,7 +82,7 @@ except ImportError: NAME = 'Pillow' -VERSION = '2.1.0' +VERSION = '2.2.0' TCL_ROOT = None JPEG_ROOT = None ZLIB_ROOT = None From 0068de0c8beb3744a2665c2aeddc7c55eb9d2e5b Mon Sep 17 00:00:00 2001 From: Alex Clark Date: Sat, 28 Sep 2013 11:14:05 -0400 Subject: [PATCH 20/66] Wording [ci skip] --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 63093a47f..87ddda12f 100644 --- a/README.rst +++ b/README.rst @@ -79,7 +79,7 @@ PIL needs you! Please help us maintain the Python Imaging Library here: Financial ~~~~~~~~~ -Pillow is a volunteer effort led by Alex Clark. If you can't help with development, you can help us financially; your assistance is very much appreciated! +Pillow is a volunteer effort led by Alex Clark. If you can't help with development, please help us financially; your assistance is very much needed and appreciated! .. Note:: Contributors: please add your name and donation preference here. From 4c85a7c0742e2e467abef30c5f9ddddb798c7593 Mon Sep 17 00:00:00 2001 From: Alex Clark Date: Sat, 28 Sep 2013 11:19:03 -0400 Subject: [PATCH 21/66] Wording [ci skip] --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 87ddda12f..bab895dde 100644 --- a/README.rst +++ b/README.rst @@ -49,7 +49,7 @@ You can install Pillow with ``pip``:: $ pip install Pillow -Or ``easy_install`` (for installing eggs, as pip does not support them):: +Or ``easy_install`` (for installing `Python Eggs `_, as pip does not support them):: $ easy_install Pillow From 666a3f76427b92b36a688d2f38483692d8eb65c7 Mon Sep 17 00:00:00 2001 From: Alex Clark Date: Sat, 28 Sep 2013 12:23:49 -0400 Subject: [PATCH 22/66] Add history [ci skip] --- CHANGES.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 90fde24ce..7afb99475 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,6 +4,9 @@ Changelog (Pillow) 2.2.0 (2013-10-01) ------------------ +- Partial fix for #290: Add preliminary support for TIFF tags. + [wiredfool] + - Fix #251 and #326: circumvent classification of pngtest_bad.png as malware [cgohlke] From c46b3fe25663cadbb00c6328584a526dda560a2f Mon Sep 17 00:00:00 2001 From: Christoph Gohlke Date: Sun, 29 Sep 2013 09:17:37 -0700 Subject: [PATCH 23/66] Make _getexif a function --- PIL/JpegImagePlugin.py | 86 ++++++++++++++++++++++-------------------- 1 file changed, 45 insertions(+), 41 deletions(-) diff --git a/PIL/JpegImagePlugin.py b/PIL/JpegImagePlugin.py index a8eb1b805..90d3b5194 100644 --- a/PIL/JpegImagePlugin.py +++ b/PIL/JpegImagePlugin.py @@ -359,51 +359,55 @@ class JpegImageFile(ImageFile.ImageFile): self.tile = [] def _getexif(self): - # Extract EXIF information. This method is highly experimental, - # and is likely to be replaced with something better in a future - # version. - from PIL import TiffImagePlugin - import io - def fixup(value): - if len(value) == 1: - return value[0] - return value - # The EXIF record consists of a TIFF file embedded in a JPEG - # application marker (!). - try: - data = self.info["exif"] - except KeyError: - return None - file = io.BytesIO(data[6:]) - head = file.read(8) - exif = {} - # process dictionary + return _getexif(self) + + +def _getexif(self): + # Extract EXIF information. This method is highly experimental, + # and is likely to be replaced with something better in a future + # version. + from PIL import TiffImagePlugin + import io + def fixup(value): + if len(value) == 1: + return value[0] + return value + # The EXIF record consists of a TIFF file embedded in a JPEG + # application marker (!). + try: + data = self.info["exif"] + except KeyError: + return None + file = io.BytesIO(data[6:]) + head = file.read(8) + exif = {} + # process dictionary + info = TiffImagePlugin.ImageFileDirectory(head) + info.load(file) + for key, value in info.items(): + exif[key] = fixup(value) + # get exif extension + try: + file.seek(exif[0x8769]) + except KeyError: + pass + else: info = TiffImagePlugin.ImageFileDirectory(head) info.load(file) for key, value in info.items(): exif[key] = fixup(value) - # get exif extension - try: - file.seek(exif[0x8769]) - except KeyError: - pass - else: - info = TiffImagePlugin.ImageFileDirectory(head) - info.load(file) - for key, value in info.items(): - exif[key] = fixup(value) - # get gpsinfo extension - try: - file.seek(exif[0x8825]) - except KeyError: - pass - else: - info = TiffImagePlugin.ImageFileDirectory(head) - info.load(file) - exif[0x8825] = gps = {} - for key, value in info.items(): - gps[key] = fixup(value) - return exif + # get gpsinfo extension + try: + file.seek(exif[0x8825]) + except KeyError: + pass + else: + info = TiffImagePlugin.ImageFileDirectory(head) + info.load(file) + exif[0x8825] = gps = {} + for key, value in info.items(): + gps[key] = fixup(value) + return exif # -------------------------------------------------------------------- # stuff to save JPEG files From 2fc724d34657899803f16de0771fe3fe14e05aa8 Mon Sep 17 00:00:00 2001 From: Christoph Gohlke Date: Sun, 29 Sep 2013 09:20:00 -0700 Subject: [PATCH 24/66] Call _getexif function instead of class method --- PIL/WebPImagePlugin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PIL/WebPImagePlugin.py b/PIL/WebPImagePlugin.py index d5d75391c..ef37e301c 100644 --- a/PIL/WebPImagePlugin.py +++ b/PIL/WebPImagePlugin.py @@ -39,8 +39,8 @@ class WebPImageFile(ImageFile.ImageFile): self.tile = [("raw", (0, 0) + self.size, 0, self.mode)] def _getexif(self): - from PIL.JpegImagePlugin import JpegImageFile - return JpegImageFile._getexif.im_func(self) + from PIL.JpegImagePlugin import _getexif + return _getexif(self) def _save(im, fp, filename): From 20e7555e5998b71e74ce438635be0cde8aaee509 Mon Sep 17 00:00:00 2001 From: Michael Hogg Date: Mon, 30 Sep 2013 09:54:25 +1000 Subject: [PATCH 25/66] Update PpmImagePlugin.py Bug fix for encoding of b_whitespace --- PIL/PpmImagePlugin.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/PIL/PpmImagePlugin.py b/PIL/PpmImagePlugin.py index c7c9c2eb4..a9c2bb283 100644 --- a/PIL/PpmImagePlugin.py +++ b/PIL/PpmImagePlugin.py @@ -24,7 +24,10 @@ from PIL import Image, ImageFile # # -------------------------------------------------------------------- -b_whitespace = string.whitespace.encode('ascii','ignore') +import locale +locale_name,locale_id = locale.getlocale() +b_whitespace = string.whitespace.decode(locale_id) +b_whitespace = b_whitespace.encode('ascii','ignore') MODES = { # standard From 9bff0b14e0b4e3b6f53d2251c186f208125bd7d9 Mon Sep 17 00:00:00 2001 From: Christoph Gohlke Date: Sun, 29 Sep 2013 19:30:43 -0700 Subject: [PATCH 26/66] Add numpy array interface support for 16 and 32 bit integer modes --- PIL/Image.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/PIL/Image.py b/PIL/Image.py index 2e120e500..56a4b7093 100644 --- a/PIL/Image.py +++ b/PIL/Image.py @@ -224,6 +224,18 @@ _MODE_CONV = { "RGBA": ('|u1', 4), "CMYK": ('|u1', 4), "YCbCr": ('|u1', 3), + "I;16": ('=u2', None), + "I;16B": ('>u2', None), + "I;16L": ('i2', None), + "I;16LS": ('u4', None), + "I;32L": ('i4', None), + "I;32LS": (' Date: Mon, 30 Sep 2013 17:24:22 +1000 Subject: [PATCH 27/66] Update PpmImagePlugin.py Bug fix when locale has not been set --- PIL/PpmImagePlugin.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/PIL/PpmImagePlugin.py b/PIL/PpmImagePlugin.py index a9c2bb283..444342bee 100644 --- a/PIL/PpmImagePlugin.py +++ b/PIL/PpmImagePlugin.py @@ -25,8 +25,10 @@ from PIL import Image, ImageFile # -------------------------------------------------------------------- import locale -locale_name,locale_id = locale.getlocale() -b_whitespace = string.whitespace.decode(locale_id) +locale_lang,locale_enc = locale.getlocale() +if locale_enc is None: + locale_lang,locale_enc = locale.getdefaultlocale() +b_whitespace = string.whitespace.decode(locale_enc) b_whitespace = b_whitespace.encode('ascii','ignore') MODES = { From e70424644ac4e805b9e79642ec8f3af8e459d576 Mon Sep 17 00:00:00 2001 From: Michael Hogg Date: Mon, 30 Sep 2013 17:44:11 +1000 Subject: [PATCH 28/66] Update PpmImagePlugin.py Making it work for Python 3.x --- PIL/PpmImagePlugin.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/PIL/PpmImagePlugin.py b/PIL/PpmImagePlugin.py index 444342bee..9aa5b1135 100644 --- a/PIL/PpmImagePlugin.py +++ b/PIL/PpmImagePlugin.py @@ -24,11 +24,14 @@ from PIL import Image, ImageFile # # -------------------------------------------------------------------- -import locale -locale_lang,locale_enc = locale.getlocale() -if locale_enc is None: - locale_lang,locale_enc = locale.getdefaultlocale() -b_whitespace = string.whitespace.decode(locale_enc) +b_whitespace = string.whitespace +try: + import locale + locale_lang,locale_enc = locale.getlocale() + if locale_enc is None: + locale_lang,locale_enc = locale.getdefaultlocale() + b_whitespace = b_whitespace.decode(locale_enc) +except: pass b_whitespace = b_whitespace.encode('ascii','ignore') MODES = { From dcd40ce5b5c0f862a8961875c3c8c49311395a13 Mon Sep 17 00:00:00 2001 From: Nikolas Stevenson-Molnar Date: Mon, 30 Sep 2013 01:04:58 -0700 Subject: [PATCH 29/66] Fix for #254 --- libImaging/Storage.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libImaging/Storage.c b/libImaging/Storage.c index 7f2a455fa..eb3be4322 100644 --- a/libImaging/Storage.c +++ b/libImaging/Storage.c @@ -36,6 +36,7 @@ #include "Imaging.h" +#include int ImagingNewCount = 0; @@ -333,6 +334,7 @@ ImagingNewBlock(const char *mode, int xsize, int ysize) im->block = (char *) malloc(bytes); if (im->block) { + memset(im->block, 0, bytes); for (y = i = 0; y < im->ysize; y++) { im->image[y] = im->block + i; From af2715c22653a469e685a7c25abf5edd59f25d2e Mon Sep 17 00:00:00 2001 From: Alex Clark Date: Mon, 30 Sep 2013 05:36:48 -0400 Subject: [PATCH 30/66] Add history [ci skip] --- CHANGES.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 7afb99475..269a558f7 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,6 +4,9 @@ Changelog (Pillow) 2.2.0 (2013-10-01) ------------------ +- Fix #273: Add numpy array interface support for 16 and 32 bit integer modes + [cgohlke] + - Partial fix for #290: Add preliminary support for TIFF tags. [wiredfool] From bf73eaef7941c7b80326fe82c13c72fdffc3ece4 Mon Sep 17 00:00:00 2001 From: Alex Clark Date: Mon, 30 Sep 2013 05:39:42 -0400 Subject: [PATCH 31/66] Add history [ci skip] --- CHANGES.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 269a558f7..20c304cd1 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,6 +4,9 @@ Changelog (Pillow) 2.2.0 (2013-10-01) ------------------ +- Fix for encoding of b_whitespace, similar to closed issue #272 + [mhogg] + - Fix #273: Add numpy array interface support for 16 and 32 bit integer modes [cgohlke] From fb97a463f08bc27ec6d6e48047490994f84bee8f Mon Sep 17 00:00:00 2001 From: Alex Clark Date: Mon, 30 Sep 2013 05:43:43 -0400 Subject: [PATCH 32/66] Add history [ci skip] --- CHANGES.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 20c304cd1..3014e9839 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,6 +4,9 @@ Changelog (Pillow) 2.2.0 (2013-10-01) ------------------ +- Fix #254: Bug in image transformations resulting from uninitialized memory + [nikmolnar] + - Fix for encoding of b_whitespace, similar to closed issue #272 [mhogg] From 726c9b2a0fdcc3a478cd15d64e840df693d3fde6 Mon Sep 17 00:00:00 2001 From: Alex Clark Date: Mon, 30 Sep 2013 06:10:10 -0400 Subject: [PATCH 33/66] Add Makefile for pre-release check --- MANIFEST.in | 1 + Makefile | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100644 Makefile diff --git a/MANIFEST.in b/MANIFEST.in index e59f60d3a..3318bdb38 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -14,6 +14,7 @@ include *.rst include .gitattributes include .travis.yml include COPYING +include Makefile include selftest.py tox.ini recursive-include Sane *.c *.txt CHANGES README *.py recursive-include Scripts *.py README diff --git a/Makefile b/Makefile new file mode 100644 index 000000000..3e5421cb3 --- /dev/null +++ b/Makefile @@ -0,0 +1,6 @@ +pre: + bin/python selftest.py + bin/python Tests/run.py + check-manifest + pyroma . + viewdoc From 4f5c55adce4fb6bb2069f83164bf20893d2b8264 Mon Sep 17 00:00:00 2001 From: Alex Clark Date: Mon, 30 Sep 2013 06:11:02 -0400 Subject: [PATCH 34/66] Wording [ci skip] --- CONTRIBUTORS.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 493ef0682..778be7151 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -1,7 +1,7 @@ Contributors (Pillow) ===================== -.. Note:: New contributors: please add your name here and send a pull request +.. Note:: Contributors: please add your name here - Alex Po - Anton Vlasenko From cdd130da9b71389222eea7fc46c33023996e5180 Mon Sep 17 00:00:00 2001 From: Alex Clark Date: Mon, 30 Sep 2013 06:12:25 -0400 Subject: [PATCH 35/66] Bump --- _imaging.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_imaging.c b/_imaging.c index 84f06e9df..6d66fcc52 100644 --- a/_imaging.c +++ b/_imaging.c @@ -71,7 +71,7 @@ * See the README file for information on usage and redistribution. */ -#define PILLOW_VERSION "2.1.0" +#define PILLOW_VERSION "2.2.0" #include "Python.h" From 5dfc5bf2562ae92740063252a32d40735583d923 Mon Sep 17 00:00:00 2001 From: Alex Clark Date: Mon, 30 Sep 2013 06:13:14 -0400 Subject: [PATCH 36/66] Bump --- PIL/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PIL/__init__.py b/PIL/__init__.py index 7704f2dfa..887ff5a00 100644 --- a/PIL/__init__.py +++ b/PIL/__init__.py @@ -12,7 +12,7 @@ # ;-) VERSION = '1.1.7' # PIL version -PILLOW_VERSION = '2.1.0' # Pillow +PILLOW_VERSION = '2.2.0' # Pillow _plugins = ['ArgImagePlugin', 'BmpImagePlugin', From 69edd9d0337ce4cdcbacb6366b986e57a145079a Mon Sep 17 00:00:00 2001 From: Alex Clark Date: Mon, 30 Sep 2013 06:15:56 -0400 Subject: [PATCH 37/66] Styling --- README.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.rst b/README.rst index bab895dde..2e7114e2f 100644 --- a/README.rst +++ b/README.rst @@ -1,14 +1,14 @@ Pillow ====== -.. Note:: Pillow < 2.0.0 supports Python versions 2.4, 2.5, 2.6, 2.7; Pillow >= 2.0.0 supports Python versions 2.6, 2.7, 3.2, 3.3. - -.. Note:: Pillow >= 2.1.0 no longer supports "import _imaging". Please use "from PIL.Image import core as _imaging" instead. +Pillow is the "friendly" PIL fork by Alex Clark and Contributors. PIL is the Python Imaging Library by Fredrik Lundh and Contributors. .. image:: https://travis-ci.org/python-imaging/Pillow.png :target: https://travis-ci.org/python-imaging/Pillow -Pillow is the "friendly" PIL fork by Alex Clark and Contributors. PIL is the Python Imaging Library by Fredrik Lundh and Contributors. +.. Note:: Pillow < 2.0.0 supports Python versions 2.4, 2.5, 2.6, 2.7; Pillow >= 2.0.0 supports Python versions 2.6, 2.7, 3.2, 3.3. + +.. Note:: Pillow >= 2.1.0 no longer supports "import _imaging". Please use "from PIL.Image import core as _imaging" instead. Introduction ------------ From b1177c8ebe3e2e48252eac3f6403f2a95942f695 Mon Sep 17 00:00:00 2001 From: Alex Clark Date: Mon, 30 Sep 2013 06:20:44 -0400 Subject: [PATCH 38/66] Styling --- README.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.rst b/README.rst index 2e7114e2f..1d72b0944 100644 --- a/README.rst +++ b/README.rst @@ -1,17 +1,17 @@ Pillow ====== -Pillow is the "friendly" PIL fork by Alex Clark and Contributors. PIL is the Python Imaging Library by Fredrik Lundh and Contributors. +Pillow is the "friendly" PIL fork by Alex Clark and Contributors. PIL is the **Python Imaging Library** by Fredrik Lundh and Contributors. .. image:: https://travis-ci.org/python-imaging/Pillow.png :target: https://travis-ci.org/python-imaging/Pillow -.. Note:: Pillow < 2.0.0 supports Python versions 2.4, 2.5, 2.6, 2.7; Pillow >= 2.0.0 supports Python versions 2.6, 2.7, 3.2, 3.3. +Introduction +------------ .. Note:: Pillow >= 2.1.0 no longer supports "import _imaging". Please use "from PIL.Image import core as _imaging" instead. -Introduction ------------- +.. Note:: Pillow < 2.0.0 supports Python versions 2.4, 2.5, 2.6, 2.7; Pillow >= 2.0.0 supports Python versions 2.6, 2.7, 3.2, 3.3. The fork author's goal is to foster active development of PIL through: From 660b1a98aa788c1ded8c30200117829882c8cddb Mon Sep 17 00:00:00 2001 From: wiredfool Date: Mon, 30 Sep 2013 09:54:34 -0700 Subject: [PATCH 39/66] test for 16bit tiffs, issue #273 --- Tests/test_numpy.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Tests/test_numpy.py b/Tests/test_numpy.py index b9cacf0bb..f4f88ff41 100644 --- a/Tests/test_numpy.py +++ b/Tests/test_numpy.py @@ -62,3 +62,12 @@ def test_3d_array(): assert_image(Image.fromarray(a[1, :, :]), "L", (10, 10)) assert_image(Image.fromarray(a[:, 1, :]), "L", (10, 10)) assert_image(Image.fromarray(a[:, :, 1]), "L", (10, 10)) + + +def test_16bit(): + img = Image.open('Tests/images/12bit.cropped.tif') + px = img.load() + np_img = numpy.array(img) + assert_equal(np_img.shape, (64,64)) + assert_equal(px[1,1],np_img[1,1]) + From 753a3266e897134e1711a5dcd35cde511050b9cc Mon Sep 17 00:00:00 2001 From: wiredfool Date: Mon, 30 Sep 2013 09:53:32 -0700 Subject: [PATCH 40/66] resolving shortened url --- Tests/test_numpy.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Tests/test_numpy.py b/Tests/test_numpy.py index f4f88ff41..988189391 100644 --- a/Tests/test_numpy.py +++ b/Tests/test_numpy.py @@ -56,7 +56,8 @@ def test_numpy_to_image(): assert_image(to_image(numpy.uint8, 4), "RGBA", (10, 10)) -# based on an erring example at http://is.gd/6F0esS +# based on an erring example at http://is.gd/6F0esS (which resolves to) +# http://stackoverflow.com/questions/10854903/what-is-causing-dimension-dependent-attributeerror-in-pil-fromarray-function def test_3d_array(): a = numpy.ones((10, 10, 10), dtype=numpy.uint8) assert_image(Image.fromarray(a[1, :, :]), "L", (10, 10)) From ca35a9d65d07920335cad1208e46b0aee2c4d024 Mon Sep 17 00:00:00 2001 From: wiredfool Date: Mon, 30 Sep 2013 14:10:58 -0700 Subject: [PATCH 41/66] tests for img -> numpy.array --- Tests/test_numpy.py | 40 +++++++++++++++++++++++++++++++++++++--- Tests/tester.py | 13 +++++++++++++ 2 files changed, 50 insertions(+), 3 deletions(-) diff --git a/Tests/test_numpy.py b/Tests/test_numpy.py index 988189391..d833d7d81 100644 --- a/Tests/test_numpy.py +++ b/Tests/test_numpy.py @@ -1,6 +1,7 @@ from tester import * from PIL import Image +import struct try: import site @@ -65,10 +66,43 @@ def test_3d_array(): assert_image(Image.fromarray(a[:, :, 1]), "L", (10, 10)) +def _test_img_equals_nparray(img, np): + assert_equal(img.size, np.shape[0:2]) + px = img.load() + for x in xrange(0, img.size[0], img.size[0]/10): + for y in xrange(0, img.size[1], img.size[1]/10): + assert_deep_equal(px[x,y], np[y,x]) + + def test_16bit(): img = Image.open('Tests/images/12bit.cropped.tif') - px = img.load() np_img = numpy.array(img) - assert_equal(np_img.shape, (64,64)) - assert_equal(px[1,1],np_img[1,1]) + _test_img_equals_nparray(img, np_img) + assert_equal(np_img.dtype, numpy.dtype('uint16')) + +def test_to_array(): + + def _to_array(mode, dtype): + img = lena(mode) + np_img = numpy.array(img) + _test_img_equals_nparray(img, np_img) + assert_equal(np_img.dtype, numpy.dtype(dtype)) + + modes = [("L", 'uint8'), + ("I", 'int32'), + ("F", 'float32'), + ("RGB", 'uint8'), + ("RGBA", 'uint8'), + ("RGBX", 'uint8'), + ("CMYK", 'uint8'), + ("YCbCr", 'uint8'), + ("I;16", 'uint16'), + ("I;16B", '>u2'), + ("I;16L", 'uint16'), + ] + + + for mode in modes: + assert_no_exception(lambda: _to_array(*mode)) + diff --git a/Tests/tester.py b/Tests/tester.py index 109265120..5f322cc20 100644 --- a/Tests/tester.py +++ b/Tests/tester.py @@ -67,6 +67,19 @@ def assert_equal(a, b, msg=None): else: failure(msg or "got %r, expected %r" % (a, b)) +def assert_deep_equal(a, b, msg=None): + try: + if len(a) == len(b): + if all([x==y for x,y in zip(a,b)]): + success() + else: + failure(msg or "got %s, expected %s" % (a,b)) + else: + failure(msg or "got length %s, expected %s" % (len(a), len(b))) + except: + assert_equal(a,b,msg) + + def assert_match(v, pattern, msg=None): import re if re.match(pattern, v): From f6e131333743e90a3c6ec7a2a3a62ff6ecf96628 Mon Sep 17 00:00:00 2001 From: wiredfool Date: Mon, 30 Sep 2013 16:41:11 -0700 Subject: [PATCH 42/66] Made linespacing test more forgiving of font rendering differences --- Tests/test_imagefont.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Tests/test_imagefont.py b/Tests/test_imagefont.py index 838075c4c..85940d087 100644 --- a/Tests/test_imagefont.py +++ b/Tests/test_imagefont.py @@ -71,8 +71,8 @@ def test_render_equal(): def test_render_multiline(): im = Image.new(mode='RGB', size=(300,100)) - ttf = ImageFont.truetype(font_path, font_size) draw = ImageDraw.Draw(im) + ttf = ImageFont.truetype(font_path, font_size) line_spacing = draw.textsize('A', font=ttf)[1] + 8 lines = ['hey you', 'you are awesome', 'this looks awkward'] y = 0 @@ -80,8 +80,13 @@ def test_render_multiline(): draw.text((0, y), line, font=ttf) y += line_spacing + target = 'Tests/images/multiline_text.png' target_img = Image.open(target) - - assert_image_equal(im, target_img) + + # some versions of freetype have different horizontal spacing. + # setting a tight epsilon, I'm showing the original test failure + # at epsilon = ~38. + assert_image_similar(im, target_img,.5) + From 2855449414aaac9098acf096b04e7809f81584d6 Mon Sep 17 00:00:00 2001 From: wiredfool Date: Tue, 1 Oct 2013 00:01:35 +0000 Subject: [PATCH 43/66] Py3k fixes --- Tests/test_numpy.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Tests/test_numpy.py b/Tests/test_numpy.py index d833d7d81..2108116be 100644 --- a/Tests/test_numpy.py +++ b/Tests/test_numpy.py @@ -2,6 +2,7 @@ from tester import * from PIL import Image import struct +import math try: import site @@ -69,8 +70,8 @@ def test_3d_array(): def _test_img_equals_nparray(img, np): assert_equal(img.size, np.shape[0:2]) px = img.load() - for x in xrange(0, img.size[0], img.size[0]/10): - for y in xrange(0, img.size[1], img.size[1]/10): + for x in range(0, img.size[0], math.floor(img.size[0]/10)): + for y in range(0, img.size[1], math.floor(img.size[1]/10)): assert_deep_equal(px[x,y], np[y,x]) From 05d0aa65f1d4497c6b3189e108318d874c3229d9 Mon Sep 17 00:00:00 2001 From: wiredfool Date: Tue, 1 Oct 2013 00:05:55 +0000 Subject: [PATCH 44/66] python2 fixes. sigh. --- Tests/test_numpy.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Tests/test_numpy.py b/Tests/test_numpy.py index 2108116be..377595751 100644 --- a/Tests/test_numpy.py +++ b/Tests/test_numpy.py @@ -2,7 +2,6 @@ from tester import * from PIL import Image import struct -import math try: import site @@ -70,8 +69,8 @@ def test_3d_array(): def _test_img_equals_nparray(img, np): assert_equal(img.size, np.shape[0:2]) px = img.load() - for x in range(0, img.size[0], math.floor(img.size[0]/10)): - for y in range(0, img.size[1], math.floor(img.size[1]/10)): + for x in range(0, img.size[0], int(img.size[0]/10)): + for y in range(0, img.size[1], int(img.size[1]/10)): assert_deep_equal(px[x,y], np[y,x]) From 5e897341c6c5c1f0fdb8d95ca7e3643dc7e89d77 Mon Sep 17 00:00:00 2001 From: wiredfool Date: Mon, 30 Sep 2013 21:21:53 -0700 Subject: [PATCH 45/66] Added mesh transform test --- Tests/test_image_transform.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Tests/test_image_transform.py b/Tests/test_image_transform.py index 7d4b6d9b3..73d98e721 100644 --- a/Tests/test_image_transform.py +++ b/Tests/test_image_transform.py @@ -2,4 +2,15 @@ from tester import * from PIL import Image -success() +def test_quad(): + # one simple quad transform, equivalent to scale & crop upper left quad + im = lena('RGB') + (w,h) = im.size + transformed = im.transform(im.size, Image.QUAD, + (0,0,0,h/2, + w/2,h/2,w/2,0), # ul -> ccw around quad + Image.BILINEAR) + + scaled = im.resize((w*2, h*2), Image.BILINEAR).crop((0,0,w,h)) + + assert_image_equal(transformed, scaled, 10) From 2241f744d99302681cbf9aed67136a38d9e28eed Mon Sep 17 00:00:00 2001 From: wiredfool Date: Mon, 30 Sep 2013 21:57:19 -0700 Subject: [PATCH 46/66] extents test --- Tests/test_image_transform.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Tests/test_image_transform.py b/Tests/test_image_transform.py index 73d98e721..0de86dc16 100644 --- a/Tests/test_image_transform.py +++ b/Tests/test_image_transform.py @@ -2,6 +2,19 @@ from tester import * from PIL import Image +def test_extent(): + im = lena('RGB') + (w,h) = im.size + transformed = im.transform(im.size, Image.EXTENT, + (0,0, + w/2,h/2), # ul -> lr + Image.BILINEAR) + + + scaled = im.resize((w*2, h*2), Image.BILINEAR).crop((0,0,w,h)) + + assert_image_similar(transformed, scaled, 10) # undone -- precision? + def test_quad(): # one simple quad transform, equivalent to scale & crop upper left quad im = lena('RGB') From 2afdc3776d07718eb42f0b59f11b22578235cec2 Mon Sep 17 00:00:00 2001 From: wiredfool Date: Mon, 30 Sep 2013 22:01:23 -0700 Subject: [PATCH 47/66] quad test, with blank space test --- Tests/test_image_transform.py | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/Tests/test_image_transform.py b/Tests/test_image_transform.py index 0de86dc16..79cb11d5b 100644 --- a/Tests/test_image_transform.py +++ b/Tests/test_image_transform.py @@ -26,4 +26,33 @@ def test_quad(): scaled = im.resize((w*2, h*2), Image.BILINEAR).crop((0,0,w,h)) - assert_image_equal(transformed, scaled, 10) + assert_image_equal(transformed, scaled) + +def test_mesh(): + # this should be a checkerboard of halfsized lenas in ul, lr + im = lena('RGBA') + (w,h) = im.size + transformed = im.transform(im.size, Image.MESH, + [((0,0,w/2,h/2), # box + (0,0,0,h, + w,h,w,0)), # ul -> ccw around quad + ((w/2,h/2,w,h), # box + (0,0,0,h, + w,h,w,0))], # ul -> ccw around quad + Image.BILINEAR) + + scaled = im.resize((w/2, h/2), Image.BILINEAR) + + checker = Image.new('RGBA', im.size) + checker.paste(scaled, (0,0)) + checker.paste(scaled, (w/2,h/2)) + + assert_image_equal(transformed, checker) + + # now, check to see that the extra area is (0,0,0,0) + blank = Image.new('RGBA', (w/2,h/2), (0,0,0,0)) + + assert_image_equal(blank, transformed.crop((w/2,0,w,h/2))) + assert_image_equal(blank, transformed.crop((0,h/2,w/2,h))) + + From 46c58560baf01bc490b0c98de71ff38703961bb6 Mon Sep 17 00:00:00 2001 From: wiredfool Date: Mon, 30 Sep 2013 22:10:19 -0700 Subject: [PATCH 48/66] adding memset test --- Tests/test_image_transform.py | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/Tests/test_image_transform.py b/Tests/test_image_transform.py index 79cb11d5b..3a9a3f51f 100644 --- a/Tests/test_image_transform.py +++ b/Tests/test_image_transform.py @@ -41,6 +41,8 @@ def test_mesh(): w,h,w,0))], # ul -> ccw around quad Image.BILINEAR) + transformed.save('transformed.png') + scaled = im.resize((w/2, h/2), Image.BILINEAR) checker = Image.new('RGBA', im.size) @@ -51,8 +53,30 @@ def test_mesh(): # now, check to see that the extra area is (0,0,0,0) blank = Image.new('RGBA', (w/2,h/2), (0,0,0,0)) - + assert_image_equal(blank, transformed.crop((w/2,0,w,h/2))) assert_image_equal(blank, transformed.crop((0,h/2,w/2,h))) +def test_blank_fill(): + # attempting to hit + # https://github.com/python-imaging/Pillow/issues/254 reported + # + # issue is that transforms with transparent overflow area + # contained junk from previous images, especially on systems with + # constrained memory. So, attempt to fill up memory with a + # pattern, free it, and then run the mesh test again. Using a 1Mp + # image with 4 bands, for 4 megs of data allocated, x 64. OMM (64 + # bit 12.04 VM with 512 megs available, this fails with Pillow < + # a0eaf06cc5f62a6fb6de556989ac1014ff3348ea + # + # Running by default, but I'd totally understand not doing it in + # the future + + foo = [Image.new('RGBA',(1024,1024), (a,a,a,a)) + for a in range(1,65)] + + # Yeah. Watch some JIT optimize this out. + foo = None + + test_mesh() From 7546e1fb178118bf638e2186b94701d4db6ffb4c Mon Sep 17 00:00:00 2001 From: wiredfool Date: Mon, 30 Sep 2013 22:32:50 -0700 Subject: [PATCH 49/66] Py3. sigh --- Tests/test_image_transform.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Tests/test_image_transform.py b/Tests/test_image_transform.py index 3a9a3f51f..56a0d9d71 100644 --- a/Tests/test_image_transform.py +++ b/Tests/test_image_transform.py @@ -7,7 +7,7 @@ def test_extent(): (w,h) = im.size transformed = im.transform(im.size, Image.EXTENT, (0,0, - w/2,h/2), # ul -> lr + w//2,h//2), # ul -> lr Image.BILINEAR) @@ -20,8 +20,8 @@ def test_quad(): im = lena('RGB') (w,h) = im.size transformed = im.transform(im.size, Image.QUAD, - (0,0,0,h/2, - w/2,h/2,w/2,0), # ul -> ccw around quad + (0,0,0,h//2, + w//2,h//2,w//2,0), # ul -> ccw around quad Image.BILINEAR) scaled = im.resize((w*2, h*2), Image.BILINEAR).crop((0,0,w,h)) @@ -33,29 +33,29 @@ def test_mesh(): im = lena('RGBA') (w,h) = im.size transformed = im.transform(im.size, Image.MESH, - [((0,0,w/2,h/2), # box + [((0,0,w//2,h//2), # box (0,0,0,h, w,h,w,0)), # ul -> ccw around quad - ((w/2,h/2,w,h), # box + ((w//2,h//2,w,h), # box (0,0,0,h, w,h,w,0))], # ul -> ccw around quad Image.BILINEAR) transformed.save('transformed.png') - scaled = im.resize((w/2, h/2), Image.BILINEAR) + scaled = im.resize((w//2, h//2), Image.BILINEAR) checker = Image.new('RGBA', im.size) checker.paste(scaled, (0,0)) - checker.paste(scaled, (w/2,h/2)) + checker.paste(scaled, (w//2,h//2)) assert_image_equal(transformed, checker) # now, check to see that the extra area is (0,0,0,0) - blank = Image.new('RGBA', (w/2,h/2), (0,0,0,0)) + blank = Image.new('RGBA', (w//2,h//2), (0,0,0,0)) - assert_image_equal(blank, transformed.crop((w/2,0,w,h/2))) - assert_image_equal(blank, transformed.crop((0,h/2,w/2,h))) + assert_image_equal(blank, transformed.crop((w//2,0,w,h//2))) + assert_image_equal(blank, transformed.crop((0,h//2,w//2,h))) def test_blank_fill(): From a0d7e72cbbe07670bd313716c91f459e6413d705 Mon Sep 17 00:00:00 2001 From: wiredfool Date: Mon, 30 Sep 2013 22:47:22 -0700 Subject: [PATCH 50/66] don't write the test image --- Tests/test_image_transform.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/test_image_transform.py b/Tests/test_image_transform.py index 56a0d9d71..31516d978 100644 --- a/Tests/test_image_transform.py +++ b/Tests/test_image_transform.py @@ -41,7 +41,7 @@ def test_mesh(): w,h,w,0))], # ul -> ccw around quad Image.BILINEAR) - transformed.save('transformed.png') + #transformed.save('transformed.png') scaled = im.resize((w//2, h//2), Image.BILINEAR) From 92ed8bfcbf395730d45e88f59982078800457d58 Mon Sep 17 00:00:00 2001 From: Alex Clark Date: Wed, 2 Oct 2013 06:40:11 -0400 Subject: [PATCH 51/66] Add platform info from @wiredfool --- README.rst | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/README.rst b/README.rst index 1d72b0944..80660dff6 100644 --- a/README.rst +++ b/README.rst @@ -174,31 +174,31 @@ Current platform support for Pillow. Binary distributions are contributed for ea .. Note:: Contributors please test on your platform, edit this document and send a pull request -+----------------------------------+-------------+------------------------------+-----------------------+ -|**Operating system** |**Supported**|**Tested Python versions** |**Tested processors** | -+----------------------------------+-------------+------------------------------+-----------------------+ -| CentOS 6.3 |Yes | 2.7,3.3 |x86 | -+----------------------------------+-------------+------------------------------+-----------------------+ -| Mac OS X 10.8 Mountain Lion |Yes | 2.6,2.7,3.2,3.3 |x86-64 | -+----------------------------------+-------------+------------------------------+-----------------------+ -| Mac OS X 10.7 Lion |Yes | 2.7 |x86-64 | -+----------------------------------+-------------+------------------------------+-----------------------+ -| Redhat Linux 6 |Yes | 2.6 |x86 | -+----------------------------------+-------------+------------------------------+-----------------------+ -| Ubuntu Linux 10.04 LTS |Yes | 2.6 |x86,x86-64 | -+----------------------------------+-------------+------------------------------+-----------------------+ -| Ubuntu Linux 12.04 LTS |Yes | 2.6,2.7,3.2,3.3 |x86,x86-64 | -+----------------------------------+-------------+------------------------------+-----------------------+ -| Raspian Wheezy |Yes | 2.7,3.2 |arm | -+----------------------------------+-------------+------------------------------+-----------------------+ -| Gentoo Linux |Yes | 2.7,3.2 |x86-64 | -+----------------------------------+-------------+------------------------------+-----------------------+ -| Windows 7 Pro |Yes | 2.7,3.2 |x86 | -+----------------------------------+-------------+------------------------------+-----------------------+ -| Windows Server 2008 R2 Enterprise|Yes | 3.3 |x86-64 | -+----------------------------------+-------------+------------------------------+-----------------------+ -| Windows 8 Pro |Yes | 2.6,2.7,3.2,3.3,PyPy1.9 [1]_ |x86 [2]_,x86-64 | -+----------------------------------+-------------+------------------------------+-----------------------+ ++----------------------------------+-------------+------------------------------+------------------------------+-----------------------+ +|**Operating system** |**Supported**|**Tested Python versions** |**Tested Pillow versions** |**Tested processors** | ++----------------------------------+-------------+------------------------------+------------------------------+-----------------------+ +| CentOS 6.3 |Yes | 2.7,3.3 | |x86 | ++----------------------------------+-------------+------------------------------+------------------------------+-----------------------+ +| Mac OS X 10.8 Mountain Lion |Yes | 2.6,2.7,3.2,3.3 | |x86-64 | ++----------------------------------+-------------+------------------------------+------------------------------+-----------------------+ +| Mac OS X 10.7 Lion |Yes | 2.7 | |x86-64 | ++----------------------------------+-------------+------------------------------+------------------------------+-----------------------+ +| Redhat Linux 6 |Yes | 2.6 | |x86 | ++----------------------------------+-------------+------------------------------+------------------------------+-----------------------+ +| Ubuntu Linux 10.04 LTS |Yes | 2.6 | 2.2.0 |x86,x86-64 | ++----------------------------------+-------------+------------------------------+------------------------------+-----------------------+ +| Ubuntu Linux 12.04 LTS |Yes | 2.6,2.7,3.2,3.3 | |x86,x86-64 | ++----------------------------------+-------------+------------------------------+------------------------------+-----------------------+ +| Raspian Wheezy |Yes | 2.7,3.2 | 2.2.0 |arm | ++----------------------------------+-------------+------------------------------+------------------------------+-----------------------+ +| Gentoo Linux |Yes | 2.7,3.2 | |x86-64 | ++----------------------------------+-------------+------------------------------+------------------------------+-----------------------+ +| Windows 7 Pro |Yes | 2.7,3.2 | |x86 | ++----------------------------------+-------------+------------------------------+------------------------------+-----------------------+ +| Windows Server 2008 R2 Enterprise|Yes | 3.3 | |x86-64 | ++----------------------------------+-------------+------------------------------+------------------------------+-----------------------+ +| Windows 8 Pro |Yes | 2.6,2.7,3.2,3.3,PyPy1.9 [1]_ | |x86 [2]_,x86-64 | ++----------------------------------+-------------+------------------------------+------------------------------+-----------------------+ .. [1] x86 only .. [2] In some cases, x86 support may indicate 32-bit compilation on 64-bit architecture (vs. compilation on 32-bit hardware). From 7eba803b9b47c7fe496f5f6bcb31a900fda38272 Mon Sep 17 00:00:00 2001 From: Alex Clark Date: Wed, 2 Oct 2013 06:44:46 -0400 Subject: [PATCH 52/66] Wording [ci skip] --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 80660dff6..de157b063 100644 --- a/README.rst +++ b/README.rst @@ -97,7 +97,7 @@ Developer Notes Build from source ~~~~~~~~~~~~~~~~~ -Some (most?) of Pillow's features require external libraries. +Many of Pillow's features require external libraries: * **libjpeg** provides JPEG functionality. From 9da4ba8a54fd5905d1ddc1e86e51ca9aa9eb22d5 Mon Sep 17 00:00:00 2001 From: Alex Clark Date: Wed, 2 Oct 2013 06:54:19 -0400 Subject: [PATCH 53/66] Add documentation for experimental wheel support --- README.rst | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index de157b063..088c2f947 100644 --- a/README.rst +++ b/README.rst @@ -129,7 +129,7 @@ Platform-specific instructions Linux +++++ -**We don't currently provide binaries for Linux.** If you didn't build Python from source, make sure you have Python's development libraries installed. In Debian or Ubuntu:: +**We do not provide binaries for Linux.** If you didn't build Python from source, make sure you have Python's development libraries installed. In Debian or Ubuntu:: $ sudo apt-get install python-dev python-setuptools @@ -148,7 +148,7 @@ Prerequisites are installed with on **Ubuntu 12.04 LTS** or **Raspian Wheezy 7.0 Mac OS X ++++++++ -**We don't currently provide binaries for OS X.** So you'll need XCode to install Pillow. (XCode 4.2 on 10.6 will work with the Official Python binary distribution. Otherwise, use whatever XCode you used to compile Python.) +**We do not provide binaries for OS X.** So you'll need XCode to install Pillow. (XCode 4.2 on 10.6 will work with the Official Python binary distribution. Otherwise, use whatever XCode you used to compile Python.) The easiest way to install the prerequisites is via `Homebrew `_. After you install Homebrew, run:: @@ -161,12 +161,26 @@ If you've built your own Python, then you should be able to install Pillow using Windows +++++++ -.. Note:: Since pip does not support eggs we use easy_install instead. +We provide binaries for Windows in the form of Python Eggs and Python Wheels. + +Python Eggs +^^^^^^^^^^^ + +.. Note:: Pip does not support Python Eggs; use easy_install instead. :: $ easy_install Pillow +Python Wheels +^^^^^^^^^^^^^ + +.. Warning:: Experimental. Requires Setuptools >=0.8 and Pip >=1.4.1 + +:: + + $ pip install --use-wheel Pillow + Platform support ~~~~~~~~~~~~~~~~ From 4bf9f9a3d7a263bd8390b29079ddaf39e18a233f Mon Sep 17 00:00:00 2001 From: Alex Clark Date: Wed, 2 Oct 2013 07:06:12 -0400 Subject: [PATCH 54/66] Wording [ci skip] --- README.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 088c2f947..4b035947a 100644 --- a/README.rst +++ b/README.rst @@ -1,7 +1,9 @@ Pillow ====== -Pillow is the "friendly" PIL fork by Alex Clark and Contributors. PIL is the **Python Imaging Library** by Fredrik Lundh and Contributors. +**Python Imaging Library (Fork)** + +Pillow is the "friendly" PIL fork by Alex Clark and Contributors. PIL is the Python Imaging Library by Fredrik Lundh and Contributors. .. image:: https://travis-ci.org/python-imaging/Pillow.png :target: https://travis-ci.org/python-imaging/Pillow From b6e8a4a8199b52b7c4b5f3fb380d49d14776a8b2 Mon Sep 17 00:00:00 2001 From: Alex Clark Date: Wed, 2 Oct 2013 07:07:14 -0400 Subject: [PATCH 55/66] Wording [ci skip] --- README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 4b035947a..9381a5f64 100644 --- a/README.rst +++ b/README.rst @@ -163,7 +163,7 @@ If you've built your own Python, then you should be able to install Pillow using Windows +++++++ -We provide binaries for Windows in the form of Python Eggs and Python Wheels. +We provide binaries for Windows in the form of Python Eggs and Python Wheels: Python Eggs ^^^^^^^^^^^ @@ -177,7 +177,7 @@ Python Eggs Python Wheels ^^^^^^^^^^^^^ -.. Warning:: Experimental. Requires Setuptools >=0.8 and Pip >=1.4.1 +.. Note:: Experimental. Requires Setuptools >=0.8 and Pip >=1.4.1 :: From 79e024d351829ff9ecb1df1615c85bdd2a9e71b9 Mon Sep 17 00:00:00 2001 From: Alex Clark Date: Wed, 2 Oct 2013 07:09:49 -0400 Subject: [PATCH 56/66] Wording [ci skip] --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 9381a5f64..8198cffeb 100644 --- a/README.rst +++ b/README.rst @@ -163,7 +163,7 @@ If you've built your own Python, then you should be able to install Pillow using Windows +++++++ -We provide binaries for Windows in the form of Python Eggs and Python Wheels: +We provide binaries for Windows in the form of Python Eggs and `Python Wheels `_: Python Eggs ^^^^^^^^^^^ From 0c4d661406af2fad1db78510be0f1833e763e9df Mon Sep 17 00:00:00 2001 From: Alex Clark Date: Wed, 2 Oct 2013 07:15:04 -0400 Subject: [PATCH 57/66] Fix manifest --- MANIFEST.in | 58 +++++++++++++++++++++++++++++++++++------------------ 1 file changed, 39 insertions(+), 19 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index 3318bdb38..f22f65a84 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,25 +1,45 @@ -exclude .hgignore -exclude .hgtags -exclude BUILDME.bat -exclude SHIP -exclude SHIP.bat -exclude make-manifest.py -graft Images -graft Tests/fonts -graft Tests/icc -graft Tests/images include *.c include *.h +include *.py include *.rst -include .gitattributes include .travis.yml -include COPYING include Makefile -include selftest.py tox.ini -recursive-include Sane *.c *.txt CHANGES README *.py -recursive-include Scripts *.py README -recursive-include Tests *.py *.txt -recursive-include Tk *.c *.txt +include tox.ini +recursive-include Images *.bdf +recursive-include Images *.fli +recursive-include Images *.gif +recursive-include Images *.ico +recursive-include Images *.jpg +recursive-include Images *.pbm +recursive-include Images *.pil +recursive-include Images *.png +recursive-include Images *.ppm +recursive-include Images *.psd +recursive-include Images *.tar +recursive-include Images *.webp +recursive-include Images *.xpm +recursive-include Sane *.c +recursive-include Sane *.py +recursive-include Sane *.txt +recursive-include Scripts *.py +recursive-include Tests *.bin +recursive-include Tests *.icm +recursive-include Tests *.jpg +recursive-include Tests *.pcf +recursive-include Tests *.pcx +recursive-include Tests *.png +recursive-include Tests *.ppm +recursive-include Tests *.py +recursive-include Tests *.tif +recursive-include Tests *.tiff +recursive-include Tests *.ttf +recursive-include Tests *.txt +recursive-include Tk *.c +recursive-include Tk *.txt +recursive-include docs *.bat recursive-include docs *.gitignore -recursive-include docs *.txt *.html *.rst *.css *.py README CHANGES CONTENTS Makefile make.bat BUILDME LICENSE COPYING -recursive-include libImaging *.c *.h +recursive-include docs *.py +recursive-include docs *.rst +recursive-include docs Makefile +recursive-include libImaging *.c +recursive-include libImaging *.h From 9b0bc48d26b021ba40bbf1aaf6291ef664f9d083 Mon Sep 17 00:00:00 2001 From: Alex Clark Date: Wed, 2 Oct 2013 07:18:39 -0400 Subject: [PATCH 58/66] Wording [ci skip] --- CHANGES.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 3014e9839..6ece01099 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,7 +1,7 @@ Changelog (Pillow) ================== -2.2.0 (2013-10-01) +2.2.0 (2013-10-02) ------------------ - Fix #254: Bug in image transformations resulting from uninitialized memory From c4758452bb5dcd1deb630a02e399da506265d2c4 Mon Sep 17 00:00:00 2001 From: wiredfool Date: Wed, 2 Oct 2013 08:36:47 -0700 Subject: [PATCH 59/66] try/except around homebrew, fixes #356 --- setup.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/setup.py b/setup.py index 0d2d80c35..16c387c09 100644 --- a/setup.py +++ b/setup.py @@ -179,12 +179,15 @@ class pil_build_ext(build_ext): _add_directory(include_dirs, "/usr/X11/include") # if homebrew is installed, use its lib and include directories import subprocess - prefix = subprocess.check_output(['brew', '--prefix']) - if prefix: - prefix = prefix.strip() - _add_directory(library_dirs, os.path.join(prefix, 'lib')) - _add_directory(include_dirs, os.path.join(prefix, 'include')) - + try: + prefix = subprocess.check_output(['brew', '--prefix']) + if prefix: + prefix = prefix.strip() + _add_directory(library_dirs, os.path.join(prefix, 'lib')) + _add_directory(include_dirs, os.path.join(prefix, 'include')) + except: + pass # homebrew not installed + elif sys.platform.startswith("linux"): for platform_ in (plat.processor(), plat.architecture()[0]): From 6ff1e1e6ab7f787e49822cbfeae9c386d10c3f73 Mon Sep 17 00:00:00 2001 From: wiredfool Date: Wed, 2 Oct 2013 09:04:00 -0700 Subject: [PATCH 60/66] Test matrix --- README.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.rst b/README.rst index 8198cffeb..f126a8eb8 100644 --- a/README.rst +++ b/README.rst @@ -197,26 +197,26 @@ Current platform support for Pillow. Binary distributions are contributed for ea +----------------------------------+-------------+------------------------------+------------------------------+-----------------------+ | Mac OS X 10.8 Mountain Lion |Yes | 2.6,2.7,3.2,3.3 | |x86-64 | +----------------------------------+-------------+------------------------------+------------------------------+-----------------------+ -| Mac OS X 10.7 Lion |Yes | 2.7 | |x86-64 | +| Mac OS X 10.7 Lion |Yes | 2.7 | 2.2.0 |x86-64 | +----------------------------------+-------------+------------------------------+------------------------------+-----------------------+ | Redhat Linux 6 |Yes | 2.6 | |x86 | +----------------------------------+-------------+------------------------------+------------------------------+-----------------------+ | Ubuntu Linux 10.04 LTS |Yes | 2.6 | 2.2.0 |x86,x86-64 | +----------------------------------+-------------+------------------------------+------------------------------+-----------------------+ -| Ubuntu Linux 12.04 LTS |Yes | 2.6,2.7,3.2,3.3 | |x86,x86-64 | +| Ubuntu Linux 12.04 LTS |Yes | 2.6,2.7,3.2,3.3 | 2.2.0 |x86,x86-64 | +----------------------------------+-------------+------------------------------+------------------------------+-----------------------+ | Raspian Wheezy |Yes | 2.7,3.2 | 2.2.0 |arm | +----------------------------------+-------------+------------------------------+------------------------------+-----------------------+ -| Gentoo Linux |Yes | 2.7,3.2 | |x86-64 | +| Gentoo Linux |Yes | 2.7,3.2 | 2.1.0 |x86-64 | +----------------------------------+-------------+------------------------------+------------------------------+-----------------------+ | Windows 7 Pro |Yes | 2.7,3.2 | |x86 | +----------------------------------+-------------+------------------------------+------------------------------+-----------------------+ | Windows Server 2008 R2 Enterprise|Yes | 3.3 | |x86-64 | +----------------------------------+-------------+------------------------------+------------------------------+-----------------------+ -| Windows 8 Pro |Yes | 2.6,2.7,3.2,3.3,PyPy1.9 [1]_ | |x86 [2]_,x86-64 | +| Windows 8 Pro |Yes | 2.6,2.7,3.2,3.3,PyPy1.9 [1]_ | 2.2.0 |x86 [2]_,x86-64 | +----------------------------------+-------------+------------------------------+------------------------------+-----------------------+ -.. [1] x86 only +.. [1] x86 only, 2.1.0 tested .. [2] In some cases, x86 support may indicate 32-bit compilation on 64-bit architecture (vs. compilation on 32-bit hardware). Port existing PIL-based code to Pillow From 523a543ce96f41376069b00697b3f890185d500d Mon Sep 17 00:00:00 2001 From: Alex Clark Date: Wed, 2 Oct 2013 12:55:28 -0400 Subject: [PATCH 61/66] Add history [ci skip] --- CHANGES.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 6ece01099..5a3432b3f 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,6 +1,12 @@ Changelog (Pillow) ================== +2.2.1 (2013-10-02) +------------------ + +- Fix #356: Error installing Pillow 2.2.0 on Mac OS X (due to hard dep on brew) + [wiredfool] + 2.2.0 (2013-10-02) ------------------ From abe682b8773d96d58e318e55946927af24b9a35e Mon Sep 17 00:00:00 2001 From: Alex Clark Date: Wed, 2 Oct 2013 12:59:05 -0400 Subject: [PATCH 62/66] Fix make pre --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 3e5421cb3..dca36d4ed 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ pre: + bin/python setup.py develop bin/python selftest.py bin/python Tests/run.py check-manifest From 7ef34063105c1979fd3442ef22fb7b85626658c1 Mon Sep 17 00:00:00 2001 From: Alex Clark Date: Wed, 2 Oct 2013 13:02:23 -0400 Subject: [PATCH 63/66] Fix manifest (again) --- MANIFEST.in | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/MANIFEST.in b/MANIFEST.in index f22f65a84..bfad0f9ad 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -2,6 +2,7 @@ include *.c include *.h include *.py include *.rst +include .gitattributes include .travis.yml include Makefile include tox.ini @@ -21,7 +22,10 @@ recursive-include Images *.xpm recursive-include Sane *.c recursive-include Sane *.py recursive-include Sane *.txt +recursive-include Sane CHANGES +recursive-include Sane README recursive-include Scripts *.py +recursive-include Scripts README recursive-include Tests *.bin recursive-include Tests *.icm recursive-include Tests *.jpg @@ -41,5 +45,8 @@ recursive-include docs *.gitignore recursive-include docs *.py recursive-include docs *.rst recursive-include docs Makefile +recursive-include docs BUILDME +recursive-include docs COPYING +recursive-include docs LICENSE recursive-include libImaging *.c recursive-include libImaging *.h From b145d302d9fd7a4514c855045b6e04bfdfae6c1f Mon Sep 17 00:00:00 2001 From: Alex Clark Date: Wed, 2 Oct 2013 13:06:06 -0400 Subject: [PATCH 64/66] Wording [ci skip] --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 16c387c09..9688feac2 100644 --- a/setup.py +++ b/setup.py @@ -572,7 +572,7 @@ class pil_build_ext(build_ext): setup( name=NAME, version=VERSION, - description='Python Imaging Library (fork)', + description='Python Imaging Library (Fork)', long_description=( _read('README.rst') + b'\n' + _read('CHANGES.rst') + b'\n' + From 72b1f2012b71a7a100d20ef8f68b03c459c3d0d1 Mon Sep 17 00:00:00 2001 From: Alex Clark Date: Wed, 2 Oct 2013 13:06:24 -0400 Subject: [PATCH 65/66] Styling [ci skip] --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index f126a8eb8..f39214e63 100644 --- a/README.rst +++ b/README.rst @@ -1,7 +1,7 @@ Pillow ====== -**Python Imaging Library (Fork)** +*Python Imaging Library (Fork)* Pillow is the "friendly" PIL fork by Alex Clark and Contributors. PIL is the Python Imaging Library by Fredrik Lundh and Contributors. From 3c2496e117f4d045a99d7e376133e67b47217ce2 Mon Sep 17 00:00:00 2001 From: Alex Clark Date: Wed, 2 Oct 2013 13:07:32 -0400 Subject: [PATCH 66/66] Bump --- PIL/__init__.py | 2 +- _imaging.c | 2 +- setup.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/PIL/__init__.py b/PIL/__init__.py index 887ff5a00..6ebe41ff6 100644 --- a/PIL/__init__.py +++ b/PIL/__init__.py @@ -12,7 +12,7 @@ # ;-) VERSION = '1.1.7' # PIL version -PILLOW_VERSION = '2.2.0' # Pillow +PILLOW_VERSION = '2.2.1' # Pillow _plugins = ['ArgImagePlugin', 'BmpImagePlugin', diff --git a/_imaging.c b/_imaging.c index 6d66fcc52..e792ebfa5 100644 --- a/_imaging.c +++ b/_imaging.c @@ -71,7 +71,7 @@ * See the README file for information on usage and redistribution. */ -#define PILLOW_VERSION "2.2.0" +#define PILLOW_VERSION "2.2.1" #include "Python.h" diff --git a/setup.py b/setup.py index 9688feac2..ad1dbdb49 100644 --- a/setup.py +++ b/setup.py @@ -82,7 +82,7 @@ except ImportError: NAME = 'Pillow' -VERSION = '2.2.0' +VERSION = '2.2.1' TCL_ROOT = None JPEG_ROOT = None ZLIB_ROOT = None