From 5f4c758b996b6dfccf5d43518a467342e5b92414 Mon Sep 17 00:00:00 2001 From: Hugo Date: Thu, 4 Sep 2014 22:53:35 +0300 Subject: [PATCH 01/25] Convert .ico to 8-bit to match lena.ico: convert hopper.ico -alpha off -colors 256 hopper2.ico --- Tests/images/hopper.ico | Bin 1150 -> 1406 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/Tests/images/hopper.ico b/Tests/images/hopper.ico index 0c6fd8c70f927ab483d12e6552d23e9a26b63eba..cd301823af45af9b33c72a5a4fd279ea96346676 100644 GIT binary patch literal 1406 zcmbtTd0Z4_7=HGgncbb)Q+AhiVPRNcaTf#@mSchC22;TzETPiSl&Byu43aeMAPF-z zf(SB`sOYdFv(w6q?7r{&&hGmzduQm6{%^kD^L;b#_dW0Nz0Uv&8YUBHX0c8K!~jSo zkO>}wWS1WWVA0QkjM4@;g#rS>M6hXD@SF(_!HTk+LPWB2QRNfSlWs?s$fMIMpesp0 zC%t!hP1xwSp)f4~4{wB%VZdv&;28sQ^K0QqOvlE_11P9li{{oI4Aq6u?lF)LqwGiW zwIRibIO66cBqQMVASp2bM#Dm>R6<3$XtW$Sy%7v=g@NPHlE|aSXGV9b89ixcZ1P*6 zr@VQBQAw+Yfl{R*z6v_Q16Jn*$J1(XLP2Miizf63?dZ#}VY7sQ4dI1(h!afUDJG{< zQ(PV~;!^m^Cs5UK82;KB%+KtFU=gv>XT@OHg{>hc`a`i8$csh1)efJ_1A%I1)eKl; zI&{_w=qyzbEBC>jGXlZY471pZHF;SWEq7ykSptS49z;t#&{7Yi8l*mGDSl#j3!Hh= zNGRTmV8bke^|MH>nT4ll3f+-ROw@>oRwZMk!izD2z#70&?ku68bOo}ScEOp^4qN&t zV$-6qd$+-wHiC@uKH{Zdn7GkOLb(^C70J-i9W!)yDuo_dCBtx44?|^XKuq>1JmLKi z%MZdH97bbtF(#L!U`J&thRDZor57XQLrr3PXvtnvl0DBrUvAf=n(drb8Q9e3Gixhtw^(UVCW`crxC-vH$-3Jw$0oGE7+|pID zTn$15bRCvjmbgtJPv~;t=Nfy3y1zgK#J$%U`KbLP>{I zv?iML*hzfB9QU6+rK}T4D^-yQSXPHvy8|3cnk1W=a#Ks%{MXOwbQfaWSrn6o6r3Ju zmd;Aw>pQxTEGEfz74alHT{ZD#1{Td#zkj&$iT z1fXXeP${)?txf|AmNUxdwbH+*=V8!EcOk`5LQQ&->s6{@B(B#L9G%dLBMTs9QFeE5oy(JRNU8lSj&=jQXaY(4*i3oq)wc-z1wgWE6dIJ2{B z{aM``&hF_wXJg;Fn^vwmxn=d5Q`W9)J+Lh@ z@KY-ZdLf*=>|WZc+Q>~CCM>uFthW-Kq1n;OnW1sY%PR14b0^Il&(_96 zQjKQ(eKaJ;TB#5k8K!cA1B@u;GAgqYd9`j3rA&@WsleUM6}jO0s=e{?^x})9722Cy zkh!`NsMn!aC@?5x9MGsx$-H>8%!;k>4dL&GUaLbVX4VQXty0b0)D(&FsZ`s`Niv(! zduxaY2qeNkfFO-8z6uqe_SIsJP9P)8inl_Bk6MPOn86$!!~MO#c%^fdYfDcVA05S2 zk_ZqU{wggYS_4h_8T>fkMS7f(j-FenJx^lrD?p_SAv-yRx}kLfnQP-TV#xEVY0tNVdD)_OJ~R~U&L1PE|Y@y z_=C6j<>~-GFZQr|se=b|9i+u1WAalIq|9J&a+{h<+k_sw!ttS99OJ*^oc3Sti&q-p#cD#xDCIPojPSN0iR+^2nhpN8{~ zS)CeSZ{8_%+S!?D<$=J-Vmn>64cMY$F-Mp%=k<|RGDB+79M0L_s2kZKx8^!8J8$yY z*dV*pC;0wiBb!qWwk92nzdc61tpKY*PfBn&A+Z*YJKv{sdXKrKzv;RBl-CFDU_0jI zo?cfTo~oH zBa7v>JeFH+BHQ?~;|R&(ecCiW Date: Fri, 5 Sep 2014 12:14:45 +0300 Subject: [PATCH 02/25] Replace lena.tif with hopper.tif (created with ImageMagick) --- Tests/images/hopper.tif | Bin 0 -> 49597 bytes Tests/test_file_libtiff.py | 12 ++++++------ Tests/test_file_tiff_metadata.py | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) create mode 100644 Tests/images/hopper.tif diff --git a/Tests/images/hopper.tif b/Tests/images/hopper.tif new file mode 100644 index 0000000000000000000000000000000000000000..cb9ef0490cdcf47fc26f50e1604749fa7ce51a30 GIT binary patch literal 49597 zcma&O2UHZ<);8?SsL-jpyQ;c6H%-n#a?Uwt5CjC2oP(fbBq@q0=A5%gk|dz0sOYGp zj%iF|7;_vQv-ZE6a=5TzK?)qQjj|5)t&oY>lR(z({yZI<#5;D{K6_WZX#9lmP*})3{i*< za&B8$h`R~K!PV5QiVK&VKl#_22Onhry#4a(?xz=j{`2zA%V+nF93NFPbknm*2u|MU zGHtEn^fiu&YuwT{I47_7%h>CYvfp)Pw?*_Wx0K!X2^;OEZ*@s&bxPT1m$J_$xz!?R zFTg5khjsFL`=l*SGdtar`dpIRos;)D&)5raO=^Qn*OV@ov;$5l2OLrl*rj&ar*t_a zb;5^TW^_6yb~wyzb4Y3jI3{=eZ;b!QDW%gnwF}^s)a5v{(>bZbEw$4(t2ZdWKeTWl zY}Uc>qJBVV(ZP^e{Q(6B{qy_%@(27221)*@bTbauk;`}F3T)^sT_$QG6oiNb(KzPE zV!85ozC4~chj8Z${e{A*5=ktNAH+gk5Y#~q+!f~svhX0jAPUC<_#96u-)4UKl7oBO zvm<X_I?^6xTp zpKDU9o1FX(*R%t`Kfp1q%OSnXA+-~D1_FV9ml^F&$sHug<5a^>fo&3`BI6%`OV`vM zmy~XoQ*T6P1KcKG}XOTRh$I^ zbCW4vnyS{i>JFwxKDs(yRt|CQp+&(dE4-3+1{NH)o!RA|6(sQ!^*($rxj z$^S12+|qhM0`Mu|-$U*K2fziwiU$BdJ^&`cMMEG#P|@Mw;$alGVPn>G#DdFr2H;$4 z3PS_<7l{0XqEI&Gim>g+`1i#*J_2C~PY@!OhVg|yY}|o~TeCQJOu`lA`HGceQ6h}V z^bv4<#aufdrzm5!DG5Gq7j`#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KF?Y#wdKq0xEOM$wH2FLNDwcepVU-o z($7?7jtR6#P^-{uC(~+0YHNYqNv_3l#;8XsB}n&k`con+Cc7VlB{k@Sovkp7XvBa9 zf}JI)X+BaDNQ%l)3nuuBO?3EUb05*DIOND!G|(gNKy-P_)omGvb7Gf`aY6C{ktggd zsk!K^0CtRGuOhaw^H@ymqaZF27Y*FlEyZIpna0M($b1qTK^nA(QRq#?Uq#%2#2b^- z_Y*@jKEWT5P;xYI0)H?Fs*DzXorNLwcU=ld-%|}Qn$#kR+op>PV0!TD#IJ_7$0`Fy zBx+RVnF1+W=Q3ettVXEOinJIZj+_HB*gPqAmdH6`Df+>Y|3TzJNP!J>T64LDl^WCa zaj(|$jIA+-0*Be_v;SWk=kwA= z5XJGgNliD=%{ITxuZ_DZwy}ZWp-6jCdhw*7&_fSJL`*PHnve!srAk03JxI?g2tv>P z359y_Rtr6O_CM%fpnl$Fg{8XLnfKk<$L{3K&g{&0=gr>npYxONr~5lAv$e_y)84e5 zry|{d{%L{+FI*A~}=T z9}GRiwUxf)NS>8jSt@X YmiKz2z25MaH`~4TNA&96i~5Y*0#{6 Date: Fri, 5 Sep 2014 12:36:24 +0300 Subject: [PATCH 03/25] Change some lena() to hopper() --- Tests/bench_cffi_access.py | 4 ++-- Tests/bench_get.py | 2 +- Tests/helper.py | 6 +++--- Tests/test_cffi.py | 32 ++++++++++++++++---------------- Tests/test_decompression_bomb.py | 8 ++++---- Tests/test_file_bmp.py | 16 ++++++++-------- Tests/test_file_iptc.py | 4 ++-- Tests/test_file_msp.py | 4 ++-- Tests/test_file_palm.py | 14 +++++++------- Tests/test_file_pcx.py | 6 +++--- Tests/test_file_pdf.py | 4 ++-- Tests/test_file_ppm.py | 2 +- Tests/test_file_tiff.py | 20 ++++++++++---------- Tests/test_file_webp_alpha.py | 4 ++-- Tests/test_file_webp_lossless.py | 6 +++--- Tests/test_imagechops.py | 4 ++-- Tests/test_imagedraw.py | 6 +++--- Tests/test_imageenhance.py | 10 +++++----- 18 files changed, 76 insertions(+), 76 deletions(-) diff --git a/Tests/bench_cffi_access.py b/Tests/bench_cffi_access.py index 8aa322aff..769396f53 100644 --- a/Tests/bench_cffi_access.py +++ b/Tests/bench_cffi_access.py @@ -1,4 +1,4 @@ -from helper import * +from helper import unittest, PillowTestCase, hopper # Not running this test by default. No DOS against Travis CI. @@ -39,7 +39,7 @@ def timer(func, label, *args): class BenchCffiAccess(PillowTestCase): def test_direct(self): - im = lena() + im = hopper() im.load() # im = Image.new( "RGB", (2000, 2000), (1, 3, 2)) caccess = im.im.pixel_access(False) diff --git a/Tests/bench_get.py b/Tests/bench_get.py index 8a1331d39..8f786acf0 100644 --- a/Tests/bench_get.py +++ b/Tests/bench_get.py @@ -6,7 +6,7 @@ import timeit def bench(mode): - im = helper.lena(mode) + im = helper.hopper(mode) get = im.im.getpixel xy = 50, 50 # position shouldn't really matter t0 = timeit.default_timer() diff --git a/Tests/helper.py b/Tests/helper.py index 637e77f9c..34dafa645 100644 --- a/Tests/helper.py +++ b/Tests/helper.py @@ -191,11 +191,11 @@ def hopper(mode="RGB", cache={}): if mode == "RGB": im = Image.open("Tests/images/hopper.ppm") elif mode == "F": - im = lena("L").convert(mode) + im = hopper("L").convert(mode) elif mode[:4] == "I;16": - im = lena("I").convert(mode) + im = hopper("I").convert(mode) else: - im = lena("RGB").convert(mode) + im = hopper("RGB").convert(mode) # cache[mode] = im return im diff --git a/Tests/test_cffi.py b/Tests/test_cffi.py index b9f99976d..5599dbb48 100644 --- a/Tests/test_cffi.py +++ b/Tests/test_cffi.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, lena +from helper import unittest, PillowTestCase, hopper try: import cffi @@ -62,16 +62,16 @@ class TestCffi(PillowTestCase): self.assertEqual(access[(x, y)], caccess[(x, y)]) def test_get_vs_c(self): - rgb = lena('RGB') + rgb = hopper('RGB') rgb.load() self._test_get_access(rgb) - self._test_get_access(lena('RGBA')) - self._test_get_access(lena('L')) - self._test_get_access(lena('LA')) - self._test_get_access(lena('1')) - self._test_get_access(lena('P')) - # self._test_get_access(lena('PA')) # PA -- how do I make a PA image? - self._test_get_access(lena('F')) + self._test_get_access(hopper('RGBA')) + self._test_get_access(hopper('L')) + self._test_get_access(hopper('LA')) + self._test_get_access(hopper('1')) + self._test_get_access(hopper('P')) + # self._test_get_access(hopper('PA')) # PA -- how do I make a PA image? + self._test_get_access(hopper('F')) im = Image.new('I;16', (10, 10), 40000) self._test_get_access(im) @@ -104,16 +104,16 @@ class TestCffi(PillowTestCase): self.assertEqual(color, caccess[(x, y)]) def test_set_vs_c(self): - rgb = lena('RGB') + rgb = hopper('RGB') rgb.load() self._test_set_access(rgb, (255, 128, 0)) - self._test_set_access(lena('RGBA'), (255, 192, 128, 0)) - self._test_set_access(lena('L'), 128) - self._test_set_access(lena('LA'), (128, 128)) - self._test_set_access(lena('1'), 255) - self._test_set_access(lena('P'), 128) + self._test_set_access(hopper('RGBA'), (255, 192, 128, 0)) + self._test_set_access(hopper('L'), 128) + self._test_set_access(hopper('LA'), (128, 128)) + self._test_set_access(hopper('1'), 255) + self._test_set_access(hopper('P'), 128) # self._test_set_access(i, (128, 128)) #PA -- undone how to make - self._test_set_access(lena('F'), 1024.0) + self._test_set_access(hopper('F'), 1024.0) im = Image.new('I;16', (10, 10), 40000) self._test_set_access(im, 45000) diff --git a/Tests/test_decompression_bomb.py b/Tests/test_decompression_bomb.py index 0803732ce..ae9aebfa8 100644 --- a/Tests/test_decompression_bomb.py +++ b/Tests/test_decompression_bomb.py @@ -2,7 +2,7 @@ from helper import unittest, PillowTestCase from PIL import Image -test_file = "Tests/images/lena.ppm" +TEST_FILE = "Tests/images/hopper.ppm" ORIGINAL_LIMIT = Image.MAX_IMAGE_PIXELS @@ -15,7 +15,7 @@ class TestDecompressionBomb(PillowTestCase): def test_no_warning_small_file(self): # Implicit assert: no warning. # A warning would cause a failure. - Image.open(test_file) + Image.open(TEST_FILE) def test_no_warning_no_limit(self): # Arrange @@ -26,7 +26,7 @@ class TestDecompressionBomb(PillowTestCase): # Act / Assert # Implicit assert: no warning. # A warning would cause a failure. - Image.open(test_file) + Image.open(TEST_FILE) def test_warning(self): # Arrange @@ -37,7 +37,7 @@ class TestDecompressionBomb(PillowTestCase): # Act / Assert self.assert_warning( Image.DecompressionBombWarning, - lambda: Image.open(test_file)) + lambda: Image.open(TEST_FILE)) if __name__ == '__main__': unittest.main() diff --git a/Tests/test_file_bmp.py b/Tests/test_file_bmp.py index e04f3642c..69792fe12 100644 --- a/Tests/test_file_bmp.py +++ b/Tests/test_file_bmp.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, lena +from helper import unittest, PillowTestCase, hopper from PIL import Image import io @@ -18,16 +18,16 @@ class TestFileBmp(PillowTestCase): self.assertEqual(reloaded.format, "BMP") def test_sanity(self): - self.roundtrip(lena()) + self.roundtrip(hopper()) - self.roundtrip(lena("1")) - self.roundtrip(lena("L")) - self.roundtrip(lena("P")) - self.roundtrip(lena("RGB")) + self.roundtrip(hopper("1")) + self.roundtrip(hopper("L")) + self.roundtrip(hopper("P")) + self.roundtrip(hopper("RGB")) def test_save_to_bytes(self): output = io.BytesIO() - im = lena() + im = hopper() im.save(output, "BMP") output.seek(0) @@ -41,7 +41,7 @@ class TestFileBmp(PillowTestCase): dpi = (72, 72) output = io.BytesIO() - im = lena() + im = hopper() im.save(output, "BMP", dpi=dpi) output.seek(0) diff --git a/Tests/test_file_iptc.py b/Tests/test_file_iptc.py index bd331e5b2..14eb135aa 100644 --- a/Tests/test_file_iptc.py +++ b/Tests/test_file_iptc.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, lena +from helper import unittest, PillowTestCase, hopper from PIL import Image, IptcImagePlugin @@ -21,7 +21,7 @@ class TestFileIptc(PillowTestCase): def test_getiptcinfo_jpg_none(self): # Arrange - im = lena() + im = hopper() # Act iptc = IptcImagePlugin.getiptcinfo(im) diff --git a/Tests/test_file_msp.py b/Tests/test_file_msp.py index a64faad10..c080247a0 100644 --- a/Tests/test_file_msp.py +++ b/Tests/test_file_msp.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, lena +from helper import unittest, PillowTestCase, hopper from PIL import Image @@ -9,7 +9,7 @@ class TestFileMsp(PillowTestCase): file = self.tempfile("temp.msp") - lena("1").save(file) + hopper("1").save(file) im = Image.open(file) im.load() diff --git a/Tests/test_file_palm.py b/Tests/test_file_palm.py index 388df0237..7af3e16bd 100644 --- a/Tests/test_file_palm.py +++ b/Tests/test_file_palm.py @@ -1,14 +1,14 @@ -from helper import unittest, PillowTestCase, lena, imagemagick_available +from helper import unittest, PillowTestCase, hopper, imagemagick_available import os.path class TestFilePalm(PillowTestCase): _roundtrip = imagemagick_available() - + def helper_save_as_palm(self, mode): # Arrange - im = lena(mode) + im = hopper(mode) outfile = self.tempfile("temp_" + mode + ".palm") # Act @@ -21,14 +21,14 @@ class TestFilePalm(PillowTestCase): def roundtrip(self, mode): if not self._roundtrip: return - - im = lena(mode) + + im = hopper(mode) outfile = self.tempfile("temp.palm") im.save(outfile) converted = self.open_withImagemagick(outfile) self.assert_image_equal(converted, im) - + def test_monochrome(self): # Arrange @@ -46,7 +46,7 @@ class TestFilePalm(PillowTestCase): self.helper_save_as_palm(mode) self.skipKnownBadTest("Palm P image is wrong") self.roundtrip(mode) - + def test_rgb_ioerror(self): # Arrange mode = "RGB" diff --git a/Tests/test_file_pcx.py b/Tests/test_file_pcx.py index f278bd91d..36d6e0315 100644 --- a/Tests/test_file_pcx.py +++ b/Tests/test_file_pcx.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, lena +from helper import unittest, PillowTestCase, hopper from PIL import Image @@ -17,7 +17,7 @@ class TestFilePcx(PillowTestCase): def test_sanity(self): for mode in ('1', 'L', 'P', 'RGB'): - self._roundtrip(lena(mode)) + self._roundtrip(hopper(mode)) def test_odd(self): # see issue #523, odd sized images should have a stride that's even. @@ -26,7 +26,7 @@ class TestFilePcx(PillowTestCase): for mode in ('1', 'L', 'P', 'RGB'): # larger, odd sized images are better here to ensure that # we handle interrupted scan lines properly. - self._roundtrip(lena(mode).resize((511, 511))) + self._roundtrip(hopper(mode).resize((511, 511))) def test_pil184(self): # Check reading of files where xmin/xmax is not zero. diff --git a/Tests/test_file_pdf.py b/Tests/test_file_pdf.py index 689302bb5..9424bc09d 100644 --- a/Tests/test_file_pdf.py +++ b/Tests/test_file_pdf.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, lena +from helper import unittest, PillowTestCase, hopper import os.path @@ -7,7 +7,7 @@ class TestFilePdf(PillowTestCase): def helper_save_as_pdf(self, mode): # Arrange - im = lena(mode) + im = hopper(mode) outfile = self.tempfile("temp_" + mode + ".pdf") # Act diff --git a/Tests/test_file_ppm.py b/Tests/test_file_ppm.py index e1f1537d2..3731fd9b1 100644 --- a/Tests/test_file_ppm.py +++ b/Tests/test_file_ppm.py @@ -3,7 +3,7 @@ from helper import unittest, PillowTestCase from PIL import Image # sample ppm stream -file = "Tests/images/lena.ppm" +file = "Tests/images/hopper.ppm" data = open(file, "rb").read() diff --git a/Tests/test_file_tiff.py b/Tests/test_file_tiff.py index 464f1c314..cf809d5d0 100644 --- a/Tests/test_file_tiff.py +++ b/Tests/test_file_tiff.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, lena, py3 +from helper import unittest, PillowTestCase, hopper, py3 from PIL import Image, TiffImagePlugin @@ -9,7 +9,7 @@ class TestFileTiff(PillowTestCase): file = self.tempfile("temp.tif") - lena("RGB").save(file) + hopper("RGB").save(file) im = Image.open(file) im.load() @@ -17,19 +17,19 @@ class TestFileTiff(PillowTestCase): self.assertEqual(im.size, (128, 128)) self.assertEqual(im.format, "TIFF") - lena("1").save(file) + hopper("1").save(file) im = Image.open(file) - lena("L").save(file) + hopper("L").save(file) im = Image.open(file) - lena("P").save(file) + hopper("P").save(file) im = Image.open(file) - lena("RGB").save(file) + hopper("RGB").save(file) im = Image.open(file) - lena("I").save(file) + hopper("I").save(file) im = Image.open(file) def test_mac_tiff(self): @@ -158,14 +158,14 @@ class TestFileTiff(PillowTestCase): im.seek(2) im.load() self.assertEqual(im.size, (20,20)) - self.assertEqual(im.convert('RGB').getpixel((0,0)), (0,0,255)) + self.assertEqual(im.convert('RGB').getpixel((0,0)), (0,0,255)) def test_multipage_last_frame(self): im = Image.open('Tests/images/multipage-lastframe.tif') im.load() self.assertEqual(im.size, (20,20)) - self.assertEqual(im.convert('RGB').getpixel((0,0)), (0,0,255)) - + self.assertEqual(im.convert('RGB').getpixel((0,0)), (0,0,255)) + def test___str__(self): # Arrange diff --git a/Tests/test_file_webp_alpha.py b/Tests/test_file_webp_alpha.py index 5f8f653cf..d6c5be450 100644 --- a/Tests/test_file_webp_alpha.py +++ b/Tests/test_file_webp_alpha.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, lena +from helper import unittest, PillowTestCase, hopper from PIL import Image @@ -40,7 +40,7 @@ class TestFileWebpAlpha(PillowTestCase): temp_file = self.tempfile("temp.webp") # temp_file = "temp.webp" - pil_image = lena('RGBA') + pil_image = hopper('RGBA') mask = Image.new("RGBA", (64, 64), (128, 128, 128, 128)) # Add some partially transparent bits: diff --git a/Tests/test_file_webp_lossless.py b/Tests/test_file_webp_lossless.py index 662ad1117..52a461a74 100644 --- a/Tests/test_file_webp_lossless.py +++ b/Tests/test_file_webp_lossless.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, lena +from helper import unittest, PillowTestCase, hopper from PIL import Image @@ -23,7 +23,7 @@ class TestFileWebpLossless(PillowTestCase): def test_write_lossless_rgb(self): temp_file = self.tempfile("temp.webp") - lena("RGB").save(temp_file, lossless=True) + hopper("RGB").save(temp_file, lossless=True) image = Image.open(temp_file) image.load() @@ -34,7 +34,7 @@ class TestFileWebpLossless(PillowTestCase): image.load() image.getdata() - self.assert_image_equal(image, lena("RGB")) + self.assert_image_equal(image, hopper("RGB")) if __name__ == '__main__': diff --git a/Tests/test_imagechops.py b/Tests/test_imagechops.py index 552314fd1..a3b7fa606 100644 --- a/Tests/test_imagechops.py +++ b/Tests/test_imagechops.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, lena +from helper import unittest, PillowTestCase, hopper from PIL import Image from PIL import ImageChops @@ -8,7 +8,7 @@ class TestImageChops(PillowTestCase): def test_sanity(self): - im = lena("L") + im = hopper("L") ImageChops.constant(im, 128) ImageChops.duplicate(im) diff --git a/Tests/test_imagedraw.py b/Tests/test_imagedraw.py index b632da73b..76e49deb4 100644 --- a/Tests/test_imagedraw.py +++ b/Tests/test_imagedraw.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, lena +from helper import unittest, PillowTestCase, hopper from PIL import Image from PIL import ImageColor @@ -34,7 +34,7 @@ POINTS2 = [10, 10, 20, 40, 30, 30] class TestImageDraw(PillowTestCase): def test_sanity(self): - im = lena("RGB").copy() + im = hopper("RGB").copy() draw = ImageDraw.ImageDraw(im) draw = ImageDraw.Draw(im) @@ -45,7 +45,7 @@ class TestImageDraw(PillowTestCase): draw.rectangle(list(range(4))) def test_deprecated(self): - im = lena().copy() + im = hopper().copy() draw = ImageDraw.Draw(im) diff --git a/Tests/test_imageenhance.py b/Tests/test_imageenhance.py index 433c49cf6..5edf46b12 100644 --- a/Tests/test_imageenhance.py +++ b/Tests/test_imageenhance.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, lena +from helper import unittest, PillowTestCase, hopper from PIL import Image from PIL import ImageEnhance @@ -10,10 +10,10 @@ class TestImageEnhance(PillowTestCase): # FIXME: assert_image # Implicit asserts no exception: - ImageEnhance.Color(lena()).enhance(0.5) - ImageEnhance.Contrast(lena()).enhance(0.5) - ImageEnhance.Brightness(lena()).enhance(0.5) - ImageEnhance.Sharpness(lena()).enhance(0.5) + ImageEnhance.Color(hopper()).enhance(0.5) + ImageEnhance.Contrast(hopper()).enhance(0.5) + ImageEnhance.Brightness(hopper()).enhance(0.5) + ImageEnhance.Sharpness(hopper()).enhance(0.5) def test_crash(self): From 8dad2b0c63be0a27fcb4bd9745cb6f5ec338a4f9 Mon Sep 17 00:00:00 2001 From: hugovk Date: Fri, 5 Sep 2014 13:03:56 +0300 Subject: [PATCH 04/25] Replace some lena() with hopper(), and temporarily disable fail-fast so we can see all failures --- .travis.yml | 2 + Tests/test_format_hsv.py | 38 ++++++++--------- Tests/test_image_array.py | 4 +- Tests/test_image_convert.py | 20 ++++----- Tests/test_image_copy.py | 4 +- Tests/test_image_crop.py | 4 +- Tests/test_image_draft.py | 4 +- Tests/test_image_filter.py | 4 +- Tests/test_image_frombytes.py | 4 +- Tests/test_image_getbbox.py | 4 +- Tests/test_image_getcolors.py | 6 +-- Tests/test_image_getdata.py | 6 +-- Tests/test_image_getextrema.py | 4 +- Tests/test_image_getim.py | 4 +- Tests/test_image_getpalette.py | 4 +- Tests/test_image_getprojection.py | 4 +- Tests/test_image_histogram.py | 4 +- Tests/test_image_mode.py | 4 +- Tests/test_image_offset.py | 4 +- Tests/test_image_point.py | 10 ++--- Tests/test_image_putdata.py | 10 ++--- Tests/test_image_putpalette.py | 6 +-- Tests/test_image_putpixel.py | 4 +- Tests/test_image_quantize.py | 12 +++--- Tests/test_image_resize.py | 4 +- Tests/test_image_rotate.py | 4 +- Tests/test_image_split.py | 26 ++++++------ Tests/test_image_thumbnail.py | 16 +++---- Tests/test_image_tobitmap.py | 8 ++-- Tests/test_image_tobytes.py | 4 +- Tests/test_image_transform.py | 10 ++--- Tests/test_image_transpose.py | 6 +-- Tests/test_imagefile.py | 6 +-- Tests/test_imagefileio.py | 4 +- Tests/test_imageops.py | 70 +++++++++++++++---------------- Tests/test_imageops_usm.py | 2 +- Tests/test_imageqt.py | 4 +- Tests/test_imagesequence.py | 10 ++--- Tests/test_imagestat.py | 8 ++-- Tests/test_locale.py | 4 +- Tests/test_mode_i16.py | 10 ++--- Tests/test_numpy.py | 6 +-- Tests/test_pickle.py | 10 ++--- Tests/threaded_save.py | 2 +- 44 files changed, 193 insertions(+), 191 deletions(-) diff --git a/.travis.yml b/.travis.yml index 704c0d949..2ce1827e5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,6 +37,8 @@ script: - CFLAGS="-coverage" python setup.py build_ext --inplace - coverage run --append --include=PIL/* selftest.py + # FIXME: re-add -x option to fail fast + # - coverage run --append --include=PIL/* -m nose -vx Tests/test_*.py - coverage run --append --include=PIL/* -m nose -vx Tests/test_*.py after_success: diff --git a/Tests/test_format_hsv.py b/Tests/test_format_hsv.py index 03603aa9b..c571e98ee 100644 --- a/Tests/test_format_hsv.py +++ b/Tests/test_format_hsv.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, lena +from helper import unittest, PillowTestCase, hopper from PIL import Image @@ -15,7 +15,7 @@ class TestFormatHSV(PillowTestCase): def tuple_to_ints(self, tp): x,y,z = tp return (int(x*255.0), int(y*255.0), int(z*255.0)) - + def test_sanity(self): im = Image.new('HSV', (100,100)) @@ -24,7 +24,7 @@ class TestFormatHSV(PillowTestCase): w90 = w.rotate(90) (px, h) = w.size - + r = Image.new('L', (px*3,h)) g = r.copy() b = r.copy() @@ -45,12 +45,12 @@ class TestFormatHSV(PillowTestCase): #print (("%d, %d -> "% (int(.75*px),int(.25*px))) + \ # "(%s, %s, %s)"%img.getpixel((.75*px, .25*px))) return img - + def to_xxx_colorsys(self, im, func, mode): # convert the hard way using the library colorsys routines. - + (r,g,b) = im.split() - + if bytes is str: conv_func = self.str_to_float else: @@ -69,9 +69,9 @@ class TestFormatHSV(PillowTestCase): new_bytes = b''.join(chr(h)+chr(s)+chr(v) for (h,s,v) in converted) else: new_bytes = b''.join(bytes(chr(h)+chr(s)+chr(v), 'latin-1') for (h,s,v) in converted) - + hsv = Image.frombytes(mode,r.size, new_bytes) - + return hsv def to_hsv_colorsys(self, im): @@ -87,7 +87,7 @@ class TestFormatHSV(PillowTestCase): #print (im.getpixel((448, 64))) #print (comparable.getpixel((448, 64))) - + #print(im.split()[0].histogram()) #print(comparable.split()[0].histogram()) @@ -110,25 +110,25 @@ class TestFormatHSV(PillowTestCase): #comparable.split()[0].show() #print (im.getpixel((192, 64))) #print (comparable.getpixel((192, 64))) - + self.assert_image_similar(im.split()[0], comparable.split()[0], 3, "R conversion is wrong") self.assert_image_similar(im.split()[1], comparable.split()[1], 3, "G conversion is wrong") self.assert_image_similar(im.split()[2], comparable.split()[2], 3, "B conversion is wrong") - - + + def test_convert(self): - im = lena('RGB').convert('HSV') - comparable = self.to_hsv_colorsys(lena('RGB')) + im = hopper('RGB').convert('HSV') + comparable = self.to_hsv_colorsys(hopper('RGB')) # print ([ord(x) for x in im.split()[0].tobytes()[:80]]) # print ([ord(x) for x in comparable.split()[0].tobytes()[:80]]) # print(im.split()[0].histogram()) # print(comparable.split()[0].histogram()) - + self.assert_image_similar(im.split()[0], comparable.split()[0], 1, "Hue conversion is wrong") self.assert_image_similar(im.split()[1], comparable.split()[1], @@ -138,10 +138,10 @@ class TestFormatHSV(PillowTestCase): def test_hsv_to_rgb(self): - comparable = self.to_hsv_colorsys(lena('RGB')) + comparable = self.to_hsv_colorsys(hopper('RGB')) converted = comparable.convert('RGB') comparable = self.to_rgb_colorsys(comparable) - + # print(converted.split()[1].histogram()) # print(target.split()[1].histogram()) @@ -156,8 +156,8 @@ class TestFormatHSV(PillowTestCase): self.assert_image_similar(converted.split()[2], comparable.split()[2], 3, "B conversion is wrong") - - + + diff --git a/Tests/test_image_array.py b/Tests/test_image_array.py index c5e49fc39..0899afd02 100644 --- a/Tests/test_image_array.py +++ b/Tests/test_image_array.py @@ -1,8 +1,8 @@ -from helper import unittest, PillowTestCase, lena +from helper import unittest, PillowTestCase, hopper from PIL import Image -im = lena().resize((128, 100)) +im = hopper().resize((128, 100)) class TestImageArray(PillowTestCase): diff --git a/Tests/test_image_convert.py b/Tests/test_image_convert.py index 01a80732b..8197a66e0 100644 --- a/Tests/test_image_convert.py +++ b/Tests/test_image_convert.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, lena +from helper import unittest, PillowTestCase, hopper from PIL import Image @@ -15,13 +15,13 @@ class TestImageConvert(PillowTestCase): modes = "1", "L", "I", "F", "RGB", "RGBA", "RGBX", "CMYK", "YCbCr" for mode in modes: - im = lena(mode) + im = hopper(mode) for mode in modes: convert(im, mode) def test_default(self): - im = lena("P") + im = hopper("P") self.assert_image(im, "P", im.size) im = im.convert() self.assert_image(im, "RGB", im.size) @@ -36,7 +36,7 @@ class TestImageConvert(PillowTestCase): self.assertEqual(orig, converted) def test_8bit(self): - im = Image.open('Tests/images/lena.jpg') + im = Image.open('Tests/images/hopper.jpg') self._test_float_conversion(im.convert('L')) def test_16bit(self): @@ -48,8 +48,8 @@ class TestImageConvert(PillowTestCase): self._test_float_conversion(im.convert('I')) def test_rgba_p(self): - im = lena('RGBA') - im.putalpha(lena('L')) + im = hopper('RGBA') + im.putalpha(hopper('L')) converted = im.convert('P') comparable = converted.convert('RGBA') @@ -57,7 +57,7 @@ class TestImageConvert(PillowTestCase): self.assert_image_similar(im, comparable, 20) def test_trns_p(self): - im = lena('P') + im = hopper('P') im.info['transparency'] = 0 f = self.tempfile('temp.png') @@ -74,7 +74,7 @@ class TestImageConvert(PillowTestCase): def test_trns_p_rgba(self): # Arrange - im = lena('P') + im = hopper('P') im.info['transparency'] = 128 # Act @@ -84,7 +84,7 @@ class TestImageConvert(PillowTestCase): self.assertNotIn('transparency', rgba.info) def test_trns_l(self): - im = lena('L') + im = hopper('L') im.info['transparency'] = 128 f = self.tempfile('temp.png') @@ -104,7 +104,7 @@ class TestImageConvert(PillowTestCase): p.save(f) def test_trns_RGB(self): - im = lena('RGB') + im = hopper('RGB') im.info['transparency'] = im.getpixel((0, 0)) f = self.tempfile('temp.png') diff --git a/Tests/test_image_copy.py b/Tests/test_image_copy.py index a7882db94..4b0905af3 100644 --- a/Tests/test_image_copy.py +++ b/Tests/test_image_copy.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, lena +from helper import unittest, PillowTestCase, hopper from PIL import Image @@ -7,7 +7,7 @@ class TestImageCopy(PillowTestCase): def test_copy(self): def copy(mode): - im = lena(mode) + im = hopper(mode) out = im.copy() self.assertEqual(out.mode, mode) self.assertEqual(out.size, im.size) diff --git a/Tests/test_image_crop.py b/Tests/test_image_crop.py index da93fe7c8..29ff2bc2a 100644 --- a/Tests/test_image_crop.py +++ b/Tests/test_image_crop.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, lena +from helper import unittest, PillowTestCase, hopper from PIL import Image @@ -7,7 +7,7 @@ class TestImageCrop(PillowTestCase): def test_crop(self): def crop(mode): - out = lena(mode).crop((50, 50, 100, 100)) + out = hopper(mode).crop((50, 50, 100, 100)) self.assertEqual(out.mode, mode) self.assertEqual(out.size, (50, 50)) for mode in "1", "P", "L", "RGB", "I", "F": diff --git a/Tests/test_image_draft.py b/Tests/test_image_draft.py index a76b8d266..c7cd90e95 100644 --- a/Tests/test_image_draft.py +++ b/Tests/test_image_draft.py @@ -3,8 +3,8 @@ from helper import unittest, PillowTestCase, fromstring, tostring from PIL import Image codecs = dir(Image.core) -filename = "Tests/images/lena.jpg" -data = tostring(Image.open(filename).resize((512, 512)), "JPEG") +fihopperme = "Tests/images/hopper.jpg" +data = tostring(Image.open(fihopperme).resize((512, 512)), "JPEG") def draft(mode, size): diff --git a/Tests/test_image_filter.py b/Tests/test_image_filter.py index 2452479cc..d29fd3dfd 100644 --- a/Tests/test_image_filter.py +++ b/Tests/test_image_filter.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, lena +from helper import unittest, PillowTestCase, hopper from PIL import Image from PIL import ImageFilter @@ -9,7 +9,7 @@ class TestImageFilter(PillowTestCase): def test_sanity(self): def filter(filter): - im = lena("L") + im = hopper("L") out = im.filter(filter) self.assertEqual(out.mode, im.mode) self.assertEqual(out.size, im.size) diff --git a/Tests/test_image_frombytes.py b/Tests/test_image_frombytes.py index aad8046a1..3f9a2237f 100644 --- a/Tests/test_image_frombytes.py +++ b/Tests/test_image_frombytes.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, lena +from helper import unittest, PillowTestCase, hopper from PIL import Image @@ -6,7 +6,7 @@ from PIL import Image class TestImageFromBytes(PillowTestCase): def test_sanity(self): - im1 = lena() + im1 = hopper() im2 = Image.frombytes(im1.mode, im1.size, im1.tobytes()) self.assert_image_equal(im1, im2) diff --git a/Tests/test_image_getbbox.py b/Tests/test_image_getbbox.py index 8d78195bd..3dc341aeb 100644 --- a/Tests/test_image_getbbox.py +++ b/Tests/test_image_getbbox.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, lena +from helper import unittest, PillowTestCase, hopper from PIL import Image @@ -7,7 +7,7 @@ class TestImageGetBbox(PillowTestCase): def test_sanity(self): - bbox = lena().getbbox() + bbox = hopper().getbbox() self.assertIsInstance(bbox, tuple) def test_bbox(self): diff --git a/Tests/test_image_getcolors.py b/Tests/test_image_getcolors.py index d3e5a4989..f3586565a 100644 --- a/Tests/test_image_getcolors.py +++ b/Tests/test_image_getcolors.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, lena +from helper import unittest, PillowTestCase, hopper class TestImageGetColors(PillowTestCase): @@ -6,7 +6,7 @@ class TestImageGetColors(PillowTestCase): def test_getcolors(self): def getcolors(mode, limit=None): - im = lena(mode) + im = hopper(mode) if limit: colors = im.getcolors(limit) else: @@ -41,7 +41,7 @@ class TestImageGetColors(PillowTestCase): def test_pack(self): # Pack problems for small tables (@PIL209) - im = lena().quantize(3).convert("RGB") + im = hopper().quantize(3).convert("RGB") expected = [ (3236, (227, 183, 147)), diff --git a/Tests/test_image_getdata.py b/Tests/test_image_getdata.py index ff6659595..bc925420d 100644 --- a/Tests/test_image_getdata.py +++ b/Tests/test_image_getdata.py @@ -1,11 +1,11 @@ -from helper import unittest, PillowTestCase, lena +from helper import unittest, PillowTestCase, hopper class TestImageGetData(PillowTestCase): def test_sanity(self): - data = lena().getdata() + data = hopper().getdata() len(data) list(data) @@ -15,7 +15,7 @@ class TestImageGetData(PillowTestCase): def test_roundtrip(self): def getdata(mode): - im = lena(mode).resize((32, 30)) + im = hopper(mode).resize((32, 30)) data = im.getdata() return data[0], len(data), len(list(data)) diff --git a/Tests/test_image_getextrema.py b/Tests/test_image_getextrema.py index af7f7698a..066d563c4 100644 --- a/Tests/test_image_getextrema.py +++ b/Tests/test_image_getextrema.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, lena +from helper import unittest, PillowTestCase, hopper class TestImageGetExtrema(PillowTestCase): @@ -6,7 +6,7 @@ class TestImageGetExtrema(PillowTestCase): def test_extrema(self): def extrema(mode): - return lena(mode).getextrema() + return hopper(mode).getextrema() self.assertEqual(extrema("1"), (0, 255)) self.assertEqual(extrema("L"), (40, 235)) diff --git a/Tests/test_image_getim.py b/Tests/test_image_getim.py index d498d3923..e83439789 100644 --- a/Tests/test_image_getim.py +++ b/Tests/test_image_getim.py @@ -1,10 +1,10 @@ -from helper import unittest, PillowTestCase, lena, py3 +from helper import unittest, PillowTestCase, hopper, py3 class TestImageGetIm(PillowTestCase): def test_sanity(self): - im = lena() + im = hopper() type_repr = repr(type(im.getim())) if py3: diff --git a/Tests/test_image_getpalette.py b/Tests/test_image_getpalette.py index 0c399c432..1a673c73d 100644 --- a/Tests/test_image_getpalette.py +++ b/Tests/test_image_getpalette.py @@ -1,11 +1,11 @@ -from helper import unittest, PillowTestCase, lena +from helper import unittest, PillowTestCase, hopper class TestImageGetPalette(PillowTestCase): def test_palette(self): def palette(mode): - p = lena(mode).getpalette() + p = hopper(mode).getpalette() if p: return p[:10] return None diff --git a/Tests/test_image_getprojection.py b/Tests/test_image_getprojection.py index 262a21d4b..108c75b90 100644 --- a/Tests/test_image_getprojection.py +++ b/Tests/test_image_getprojection.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, lena +from helper import unittest, PillowTestCase, hopper from PIL import Image @@ -7,7 +7,7 @@ class TestImageGetProjection(PillowTestCase): def test_sanity(self): - im = lena() + im = hopper() projection = im.getprojection() diff --git a/Tests/test_image_histogram.py b/Tests/test_image_histogram.py index 70f78a1fb..4bf8d2f80 100644 --- a/Tests/test_image_histogram.py +++ b/Tests/test_image_histogram.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, lena +from helper import unittest, PillowTestCase, hopper class TestImageHistogram(PillowTestCase): @@ -6,7 +6,7 @@ class TestImageHistogram(PillowTestCase): def test_histogram(self): def histogram(mode): - h = lena(mode).histogram() + h = hopper(mode).histogram() return len(h), min(h), max(h) self.assertEqual(histogram("1"), (256, 0, 8872)) diff --git a/Tests/test_image_mode.py b/Tests/test_image_mode.py index 74ed9b7aa..6441c7d1b 100644 --- a/Tests/test_image_mode.py +++ b/Tests/test_image_mode.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, lena +from helper import unittest, PillowTestCase, hopper from PIL import Image @@ -7,7 +7,7 @@ class TestImageMode(PillowTestCase): def test_sanity(self): - im = lena() + im = hopper() im.mode from PIL import ImageMode diff --git a/Tests/test_image_offset.py b/Tests/test_image_offset.py index 09f12266f..e5fe0bf47 100644 --- a/Tests/test_image_offset.py +++ b/Tests/test_image_offset.py @@ -1,11 +1,11 @@ -from helper import unittest, PillowTestCase, lena +from helper import unittest, PillowTestCase, hopper class TestImageOffset(PillowTestCase): def test_offset(self): - im1 = lena() + im1 = hopper() im2 = self.assert_warning(DeprecationWarning, lambda: im1.offset(10)) self.assertEqual(im1.getpixel((0, 0)), im2.getpixel((10, 10))) diff --git a/Tests/test_image_point.py b/Tests/test_image_point.py index 04054fa84..ee0165d09 100644 --- a/Tests/test_image_point.py +++ b/Tests/test_image_point.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, lena +from helper import unittest, PillowTestCase, hopper import sys @@ -6,7 +6,7 @@ import sys class TestImagePoint(PillowTestCase): def test_sanity(self): - im = lena() + im = hopper() self.assertRaises(ValueError, lambda: im.point(list(range(256)))) im.point(list(range(256))*3) @@ -28,19 +28,19 @@ class TestImagePoint(PillowTestCase): # see https://github.com/python-pillow/Pillow/issues/484 #self.skipKnownBadTest(msg="Too Slow on pypy", interpreter='pypy') - im = lena("I") + im = hopper("I") im.point(list(range(256))*256, 'L') def test_f_lut(self): """ Tests for floating point lut of 8bit gray image """ - im = lena('L') + im = hopper('L') lut = [0.5 * float(x) for x in range(256)] out = im.point(lut, 'F') int_lut = [x//2 for x in range(256)] self.assert_image_equal(out.convert('L'), im.point(int_lut, 'L')) - + if __name__ == '__main__': unittest.main() diff --git a/Tests/test_image_putdata.py b/Tests/test_image_putdata.py index acea0d62a..1535acf35 100644 --- a/Tests/test_image_putdata.py +++ b/Tests/test_image_putdata.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, lena +from helper import unittest, PillowTestCase, hopper import sys @@ -9,7 +9,7 @@ class TestImagePutData(PillowTestCase): def test_sanity(self): - im1 = lena() + im1 = hopper() data = list(im1.getdata()) @@ -47,7 +47,7 @@ class TestImagePutData(PillowTestCase): im.putdata(list(range(256))*256) def test_mode_i(self): - src = lena('L') + src = hopper('L') data = list(src.getdata()) im = Image.new('I', src.size, 0) im.putdata(data, 2, 256) @@ -56,7 +56,7 @@ class TestImagePutData(PillowTestCase): self.assertEqual(list(im.getdata()), target) def test_mode_F(self): - src = lena('L') + src = hopper('L') data = list(src.getdata()) im = Image.new('F', src.size, 0) im.putdata(data, 2.0, 256.0) @@ -64,7 +64,7 @@ class TestImagePutData(PillowTestCase): target = [2.0* float(elt) + 256.0 for elt in data] self.assertEqual(list(im.getdata()), target) - + if __name__ == '__main__': unittest.main() diff --git a/Tests/test_image_putpalette.py b/Tests/test_image_putpalette.py index a77c1e565..a1f00c361 100644 --- a/Tests/test_image_putpalette.py +++ b/Tests/test_image_putpalette.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, lena +from helper import unittest, PillowTestCase, hopper from PIL import ImagePalette @@ -7,7 +7,7 @@ class TestImagePutPalette(PillowTestCase): def test_putpalette(self): def palette(mode): - im = lena(mode).copy() + im = hopper(mode).copy() im.putpalette(list(range(256))*3) p = im.getpalette() if p: @@ -23,7 +23,7 @@ class TestImagePutPalette(PillowTestCase): self.assertRaises(ValueError, lambda: palette("YCbCr")) def test_imagepalette(self): - im = lena("P") + im = hopper("P") im.putpalette(ImagePalette.negative()) im.putpalette(ImagePalette.random()) im.putpalette(ImagePalette.sepia()) diff --git a/Tests/test_image_putpixel.py b/Tests/test_image_putpixel.py index a7f5dc2bb..418e9703c 100644 --- a/Tests/test_image_putpixel.py +++ b/Tests/test_image_putpixel.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, lena +from helper import unittest, PillowTestCase, hopper from PIL import Image @@ -9,7 +9,7 @@ class TestImagePutPixel(PillowTestCase): def test_sanity(self): - im1 = lena() + im1 = hopper() im2 = Image.new(im1.mode, im1.size, 0) for y in range(im1.size[1]): diff --git a/Tests/test_image_quantize.py b/Tests/test_image_quantize.py index 2cbdac225..e8183eb48 100644 --- a/Tests/test_image_quantize.py +++ b/Tests/test_image_quantize.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, lena +from helper import unittest, PillowTestCase, hopper from PIL import Image @@ -6,17 +6,17 @@ from PIL import Image class TestImageQuantize(PillowTestCase): def test_sanity(self): - im = lena() + im = hopper() im = im.quantize() self.assert_image(im, "P", im.size) - im = lena() - im = im.quantize(palette=lena("P")) + im = hopper() + im = im.quantize(palette=hopper("P")) self.assert_image(im, "P", im.size) def test_octree_quantize(self): - im = lena() + im = hopper() im = im.quantize(100, Image.FASTOCTREE) self.assert_image(im, "P", im.size) @@ -24,7 +24,7 @@ class TestImageQuantize(PillowTestCase): assert len(im.getcolors()) == 100 def test_rgba_quantize(self): - im = lena('RGBA') + im = hopper('RGBA') im.quantize() self.assertRaises(Exception, lambda: im.quantize(method=0)) diff --git a/Tests/test_image_resize.py b/Tests/test_image_resize.py index 6c9932e45..603f598d8 100644 --- a/Tests/test_image_resize.py +++ b/Tests/test_image_resize.py @@ -1,11 +1,11 @@ -from helper import unittest, PillowTestCase, lena +from helper import unittest, PillowTestCase, hopper class TestImageResize(PillowTestCase): def test_resize(self): def resize(mode, size): - out = lena(mode).resize(size) + out = hopper(mode).resize(size) self.assertEqual(out.mode, mode) self.assertEqual(out.size, size) for mode in "1", "P", "L", "RGB", "I", "F": diff --git a/Tests/test_image_rotate.py b/Tests/test_image_rotate.py index 531fdd63f..38391adae 100644 --- a/Tests/test_image_rotate.py +++ b/Tests/test_image_rotate.py @@ -1,11 +1,11 @@ -from helper import unittest, PillowTestCase, lena +from helper import unittest, PillowTestCase, hopper class TestImageRotate(PillowTestCase): def test_rotate(self): def rotate(mode): - im = lena(mode) + im = hopper(mode) out = im.rotate(45) self.assertEqual(out.mode, mode) self.assertEqual(out.size, im.size) # default rotate clips output diff --git a/Tests/test_image_split.py b/Tests/test_image_split.py index 343f4bf8e..0e057523b 100644 --- a/Tests/test_image_split.py +++ b/Tests/test_image_split.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, lena +from helper import unittest, PillowTestCase, hopper from PIL import Image @@ -7,7 +7,7 @@ class TestImageSplit(PillowTestCase): def test_split(self): def split(mode): - layers = lena(mode).split() + layers = hopper(mode).split() return [(i.mode, i.size[0], i.size[1]) for i in layers] self.assertEqual(split("1"), [('1', 128, 128)]) self.assertEqual(split("L"), [('L', 128, 128)]) @@ -30,16 +30,16 @@ class TestImageSplit(PillowTestCase): def test_split_merge(self): def split_merge(mode): - return Image.merge(mode, lena(mode).split()) - self.assert_image_equal(lena("1"), split_merge("1")) - self.assert_image_equal(lena("L"), split_merge("L")) - self.assert_image_equal(lena("I"), split_merge("I")) - self.assert_image_equal(lena("F"), split_merge("F")) - self.assert_image_equal(lena("P"), split_merge("P")) - self.assert_image_equal(lena("RGB"), split_merge("RGB")) - self.assert_image_equal(lena("RGBA"), split_merge("RGBA")) - self.assert_image_equal(lena("CMYK"), split_merge("CMYK")) - self.assert_image_equal(lena("YCbCr"), split_merge("YCbCr")) + return Image.merge(mode, hopper(mode).split()) + self.assert_image_equal(hopper("1"), split_merge("1")) + self.assert_image_equal(hopper("L"), split_merge("L")) + self.assert_image_equal(hopper("I"), split_merge("I")) + self.assert_image_equal(hopper("F"), split_merge("F")) + self.assert_image_equal(hopper("P"), split_merge("P")) + self.assert_image_equal(hopper("RGB"), split_merge("RGB")) + self.assert_image_equal(hopper("RGBA"), split_merge("RGBA")) + self.assert_image_equal(hopper("CMYK"), split_merge("CMYK")) + self.assert_image_equal(hopper("YCbCr"), split_merge("YCbCr")) def test_split_open(self): codecs = dir(Image.core) @@ -50,7 +50,7 @@ class TestImageSplit(PillowTestCase): file = self.tempfile("temp.pcx") def split_open(mode): - lena(mode).save(file) + hopper(mode).save(file) im = Image.open(file) return len(im.split()) self.assertEqual(split_open("1"), 1) diff --git a/Tests/test_image_thumbnail.py b/Tests/test_image_thumbnail.py index ee49be43e..d4c676bbd 100644 --- a/Tests/test_image_thumbnail.py +++ b/Tests/test_image_thumbnail.py @@ -1,38 +1,38 @@ -from helper import unittest, PillowTestCase, lena +from helper import unittest, PillowTestCase, hopper class TestImageThumbnail(PillowTestCase): def test_sanity(self): - im = lena() + im = hopper() im.thumbnail((100, 100)) self.assert_image(im, im.mode, (100, 100)) def test_aspect(self): - im = lena() + im = hopper() im.thumbnail((100, 100)) self.assert_image(im, im.mode, (100, 100)) - im = lena().resize((128, 256)) + im = hopper().resize((128, 256)) im.thumbnail((100, 100)) self.assert_image(im, im.mode, (50, 100)) - im = lena().resize((128, 256)) + im = hopper().resize((128, 256)) im.thumbnail((50, 100)) self.assert_image(im, im.mode, (50, 100)) - im = lena().resize((256, 128)) + im = hopper().resize((256, 128)) im.thumbnail((100, 100)) self.assert_image(im, im.mode, (100, 50)) - im = lena().resize((256, 128)) + im = hopper().resize((256, 128)) im.thumbnail((100, 50)) self.assert_image(im, im.mode, (100, 50)) - im = lena().resize((128, 128)) + im = hopper().resize((128, 128)) im.thumbnail((100, 100)) self.assert_image(im, im.mode, (100, 100)) diff --git a/Tests/test_image_tobitmap.py b/Tests/test_image_tobitmap.py index 56b5ef001..e26a225c2 100644 --- a/Tests/test_image_tobitmap.py +++ b/Tests/test_image_tobitmap.py @@ -1,14 +1,14 @@ -from helper import unittest, PillowTestCase, lena, fromstring +from helper import unittest, PillowTestCase, hopper, fromstring class TestImageToBitmap(PillowTestCase): def test_sanity(self): - self.assertRaises(ValueError, lambda: lena().tobitmap()) - lena().convert("1").tobitmap() + self.assertRaises(ValueError, lambda: hopper().tobitmap()) + hopper().convert("1").tobitmap() - im1 = lena().convert("1") + im1 = hopper().convert("1") bitmap = im1.tobitmap() diff --git a/Tests/test_image_tobytes.py b/Tests/test_image_tobytes.py index 6dbf7d6f2..31a7e1722 100644 --- a/Tests/test_image_tobytes.py +++ b/Tests/test_image_tobytes.py @@ -1,10 +1,10 @@ -from helper import unittest, PillowTestCase, lena +from helper import unittest, PillowTestCase, hopper class TestImageToBytes(PillowTestCase): def test_sanity(self): - data = lena().tobytes() + data = hopper().tobytes() self.assertTrue(isinstance(data, bytes)) if __name__ == '__main__': diff --git a/Tests/test_image_transform.py b/Tests/test_image_transform.py index 42a3d78f3..885893bbe 100644 --- a/Tests/test_image_transform.py +++ b/Tests/test_image_transform.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, lena +from helper import unittest, PillowTestCase, hopper from PIL import Image @@ -22,7 +22,7 @@ class TestImageTransform(PillowTestCase): im.transform((100, 100), transform) def test_extent(self): - im = lena('RGB') + im = hopper('RGB') (w, h) = im.size transformed = im.transform(im.size, Image.EXTENT, (0, 0, @@ -36,7 +36,7 @@ class TestImageTransform(PillowTestCase): def test_quad(self): # one simple quad transform, equivalent to scale & crop upper left quad - im = lena('RGB') + im = hopper('RGB') (w, h) = im.size transformed = im.transform(im.size, Image.QUAD, (0, 0, 0, h//2, @@ -49,8 +49,8 @@ class TestImageTransform(PillowTestCase): self.assert_image_equal(transformed, scaled) def test_mesh(self): - # this should be a checkerboard of halfsized lenas in ul, lr - im = lena('RGBA') + # this should be a checkerboard of halfsized hoppers in ul, lr + im = hopper('RGBA') (w, h) = im.size transformed = im.transform(im.size, Image.MESH, [((0, 0, w//2, h//2), # box diff --git a/Tests/test_image_transpose.py b/Tests/test_image_transpose.py index f13e54ee7..3e4257bc0 100644 --- a/Tests/test_image_transpose.py +++ b/Tests/test_image_transpose.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, lena +from helper import unittest, PillowTestCase, hopper from PIL import Image @@ -13,7 +13,7 @@ class TestImageTranspose(PillowTestCase): def test_sanity(self): - im = lena() + im = hopper() im.transpose(FLIP_LEFT_RIGHT) im.transpose(FLIP_TOP_BOTTOM) @@ -24,7 +24,7 @@ class TestImageTranspose(PillowTestCase): def test_roundtrip(self): - im = lena() + im = hopper() def transpose(first, second): return im.transpose(first).transpose(second) diff --git a/Tests/test_imagefile.py b/Tests/test_imagefile.py index 78fb3427f..3556661ae 100644 --- a/Tests/test_imagefile.py +++ b/Tests/test_imagefile.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, lena, fromstring, tostring +from helper import unittest, PillowTestCase, hopper, fromstring, tostring from io import BytesIO @@ -20,7 +20,7 @@ class TestImageFile(PillowTestCase): def roundtrip(format): - im = lena("L").resize((1000, 1000)) + im = hopper("L").resize((1000, 1000)) if format in ("MSP", "XBM"): im = im.convert("1") @@ -73,7 +73,7 @@ class TestImageFile(PillowTestCase): def test_safeblock(self): - im1 = lena() + im1 = hopper() if "zip_encoder" not in codecs: self.skipTest("PNG (zlib) encoder not available") diff --git a/Tests/test_imagefileio.py b/Tests/test_imagefileio.py index 32ee0bc5e..f18474403 100644 --- a/Tests/test_imagefileio.py +++ b/Tests/test_imagefileio.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, lena, tostring +from helper import unittest, PillowTestCase, hopper, tostring from PIL import Image from PIL import ImageFileIO @@ -19,7 +19,7 @@ class TestImageFileIo(PillowTestCase): def close(self): pass - im1 = lena() + im1 = hopper() io = ImageFileIO.ImageFileIO(DumbFile(tostring(im1, "PPM"))) diff --git a/Tests/test_imageops.py b/Tests/test_imageops.py index a4a94ca4d..0ffb14bfe 100644 --- a/Tests/test_imageops.py +++ b/Tests/test_imageops.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, lena +from helper import unittest, PillowTestCase, hopper from PIL import ImageOps @@ -14,65 +14,65 @@ class TestImageOps(PillowTestCase): def test_sanity(self): - ImageOps.autocontrast(lena("L")) - ImageOps.autocontrast(lena("RGB")) + ImageOps.autocontrast(hopper("L")) + ImageOps.autocontrast(hopper("RGB")) - ImageOps.autocontrast(lena("L"), cutoff=10) - ImageOps.autocontrast(lena("L"), ignore=[0, 255]) + ImageOps.autocontrast(hopper("L"), cutoff=10) + ImageOps.autocontrast(hopper("L"), ignore=[0, 255]) - ImageOps.colorize(lena("L"), (0, 0, 0), (255, 255, 255)) - ImageOps.colorize(lena("L"), "black", "white") + ImageOps.colorize(hopper("L"), (0, 0, 0), (255, 255, 255)) + ImageOps.colorize(hopper("L"), "black", "white") - ImageOps.crop(lena("L"), 1) - ImageOps.crop(lena("RGB"), 1) + ImageOps.crop(hopper("L"), 1) + ImageOps.crop(hopper("RGB"), 1) - ImageOps.deform(lena("L"), self.deformer) - ImageOps.deform(lena("RGB"), self.deformer) + ImageOps.deform(hopper("L"), self.deformer) + ImageOps.deform(hopper("RGB"), self.deformer) - ImageOps.equalize(lena("L")) - ImageOps.equalize(lena("RGB")) + ImageOps.equalize(hopper("L")) + ImageOps.equalize(hopper("RGB")) - ImageOps.expand(lena("L"), 1) - ImageOps.expand(lena("RGB"), 1) - ImageOps.expand(lena("L"), 2, "blue") - ImageOps.expand(lena("RGB"), 2, "blue") + ImageOps.expand(hopper("L"), 1) + ImageOps.expand(hopper("RGB"), 1) + ImageOps.expand(hopper("L"), 2, "blue") + ImageOps.expand(hopper("RGB"), 2, "blue") - ImageOps.fit(lena("L"), (128, 128)) - ImageOps.fit(lena("RGB"), (128, 128)) + ImageOps.fit(hopper("L"), (128, 128)) + ImageOps.fit(hopper("RGB"), (128, 128)) - ImageOps.flip(lena("L")) - ImageOps.flip(lena("RGB")) + ImageOps.flip(hopper("L")) + ImageOps.flip(hopper("RGB")) - ImageOps.grayscale(lena("L")) - ImageOps.grayscale(lena("RGB")) + ImageOps.grayscale(hopper("L")) + ImageOps.grayscale(hopper("RGB")) - ImageOps.invert(lena("L")) - ImageOps.invert(lena("RGB")) + ImageOps.invert(hopper("L")) + ImageOps.invert(hopper("RGB")) - ImageOps.mirror(lena("L")) - ImageOps.mirror(lena("RGB")) + ImageOps.mirror(hopper("L")) + ImageOps.mirror(hopper("RGB")) - ImageOps.posterize(lena("L"), 4) - ImageOps.posterize(lena("RGB"), 4) + ImageOps.posterize(hopper("L"), 4) + ImageOps.posterize(hopper("RGB"), 4) - ImageOps.solarize(lena("L")) - ImageOps.solarize(lena("RGB")) + ImageOps.solarize(hopper("L")) + ImageOps.solarize(hopper("RGB")) def test_1pxfit(self): # Division by zero in equalize if image is 1 pixel high - newimg = ImageOps.fit(lena("RGB").resize((1, 1)), (35, 35)) + newimg = ImageOps.fit(hopper("RGB").resize((1, 1)), (35, 35)) self.assertEqual(newimg.size, (35, 35)) - newimg = ImageOps.fit(lena("RGB").resize((1, 100)), (35, 35)) + newimg = ImageOps.fit(hopper("RGB").resize((1, 100)), (35, 35)) self.assertEqual(newimg.size, (35, 35)) - newimg = ImageOps.fit(lena("RGB").resize((100, 1)), (35, 35)) + newimg = ImageOps.fit(hopper("RGB").resize((100, 1)), (35, 35)) self.assertEqual(newimg.size, (35, 35)) def test_pil163(self): # Division by zero in equalize if < 255 pixels in image (@PIL163) - i = lena("RGB").resize((15, 16)) + i = hopper("RGB").resize((15, 16)) ImageOps.equalize(i.convert("L")) ImageOps.equalize(i.convert("P")) diff --git a/Tests/test_imageops_usm.py b/Tests/test_imageops_usm.py index be7a669da..ba65f211b 100644 --- a/Tests/test_imageops_usm.py +++ b/Tests/test_imageops_usm.py @@ -4,7 +4,7 @@ from PIL import Image from PIL import ImageOps from PIL import ImageFilter -im = Image.open("Tests/images/lena.ppm") +im = Image.open("Tests/images/hopper.ppm") class TestImageOpsUsm(PillowTestCase): diff --git a/Tests/test_imageqt.py b/Tests/test_imageqt.py index fd50bf320..cd26e0038 100644 --- a/Tests/test_imageqt.py +++ b/Tests/test_imageqt.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, lena +from helper import unittest, PillowTestCase, hopper try: from PIL import ImageQt @@ -44,7 +44,7 @@ class TestImageQt(PillowTestCase): def test_image(self): for mode in ('1', 'RGB', 'RGBA', 'L', 'P'): - ImageQt.ImageQt(lena(mode)) + ImageQt.ImageQt(hopper(mode)) if __name__ == '__main__': diff --git a/Tests/test_imagesequence.py b/Tests/test_imagesequence.py index 068290451..62a83cda6 100644 --- a/Tests/test_imagesequence.py +++ b/Tests/test_imagesequence.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, lena +from helper import unittest, PillowTestCase, hopper from PIL import Image, ImageSequence, TiffImagePlugin @@ -9,7 +9,7 @@ class TestImageSequence(PillowTestCase): file = self.tempfile("temp.im") - im = lena("RGB") + im = hopper("RGB") im.save(file) seq = ImageSequence.Iterator(im) @@ -31,14 +31,14 @@ class TestImageSequence(PillowTestCase): self.assertEqual(index, im.tell()) frame.convert('RGB') Image.DEBUG=False - + def test_tiff(self): #self._test_multipage_tiff(True) self._test_multipage_tiff(False) def test_libtiff(self): codecs = dir(Image.core) - + if "libtiff_encoder" not in codecs or "libtiff_decoder" not in codecs: self.skipTest("tiff support not available") @@ -46,7 +46,7 @@ class TestImageSequence(PillowTestCase): #self._test_multipage_tiff(True) self._test_multipage_tiff(False) TiffImagePlugin.READ_LIBTIFF = False - + if __name__ == '__main__': unittest.main() diff --git a/Tests/test_imagestat.py b/Tests/test_imagestat.py index 4d30ff023..fbb96599a 100644 --- a/Tests/test_imagestat.py +++ b/Tests/test_imagestat.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, lena +from helper import unittest, PillowTestCase, hopper from PIL import Image from PIL import ImageStat @@ -8,7 +8,7 @@ class TestImageStat(PillowTestCase): def test_sanity(self): - im = lena() + im = hopper() st = ImageStat.Stat(im) st = ImageStat.Stat(im.histogram()) @@ -28,9 +28,9 @@ class TestImageStat(PillowTestCase): self.assertRaises(TypeError, lambda: ImageStat.Stat(1)) - def test_lena(self): + def test_hopper(self): - im = lena() + im = hopper() st = ImageStat.Stat(im) diff --git a/Tests/test_locale.py b/Tests/test_locale.py index 9ef136bf9..e4fab1497 100644 --- a/Tests/test_locale.py +++ b/Tests/test_locale.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, lena +from helper import unittest, PillowTestCase, hopper from PIL import Image @@ -19,7 +19,7 @@ import locale # one of string.whitespace is not freely convertable into ascii. -path = "Tests/images/lena.jpg" +path = "Tests/images/hopper.jpg" class TestLocale(PillowTestCase): diff --git a/Tests/test_mode_i16.py b/Tests/test_mode_i16.py index 0cd5dba0f..4c6c181a8 100644 --- a/Tests/test_mode_i16.py +++ b/Tests/test_mode_i16.py @@ -1,11 +1,11 @@ -from helper import unittest, PillowTestCase, lena +from helper import unittest, PillowTestCase, hopper from PIL import Image class TestModeI16(PillowTestCase): - original = lena().resize((32,32)).convert('I') + original = hopper().resize((32,32)).convert('I') def verify(self, im1): im2 = self.original.copy() @@ -39,10 +39,10 @@ class TestModeI16(PillowTestCase): imOut = imIn.transform((w, h), Image.EXTENT, (0, 0, w, h)) self.verify(imOut) # transform - filename = self.tempfile("temp.im") - imIn.save(filename) + fihopperme = self.tempfile("temp.im") + imIn.save(fihopperme) - imOut = Image.open(filename) + imOut = Image.open(fihopperme) self.verify(imIn) self.verify(imOut) diff --git a/Tests/test_numpy.py b/Tests/test_numpy.py index 07c3e0c21..b00b8b36b 100644 --- a/Tests/test_numpy.py +++ b/Tests/test_numpy.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, lena +from helper import unittest, PillowTestCase, hopper from PIL import Image @@ -90,7 +90,7 @@ class TestNumpy(PillowTestCase): def test_to_array(self): def _to_array(mode, dtype): - img = lena(mode) + img = hopper(mode) np_img = numpy.array(img) self._test_img_equals_nparray(img, np_img) self.assertEqual(np_img.dtype, numpy.dtype(dtype)) @@ -117,7 +117,7 @@ class TestNumpy(PillowTestCase): data = list(range(256))*3 lut = numpy.array(data, dtype='uint8') - im = lena() + im = hopper() im.point(lut) diff --git a/Tests/test_pickle.py b/Tests/test_pickle.py index eae5eb671..595141cb7 100644 --- a/Tests/test_pickle.py +++ b/Tests/test_pickle.py @@ -6,20 +6,20 @@ from PIL import Image class TestPickle(PillowTestCase): def helper_pickle_file(self, pickle, protocol=0): - im = Image.open('Tests/images/lena.jpg') - filename = self.tempfile('temp.pkl') + im = Image.open('Tests/images/hopper.jpg') + fihopperme = self.tempfile('temp.pkl') # Act - with open(filename, 'wb') as f: + with open(fihopperme, 'wb') as f: pickle.dump(im, f, protocol) - with open(filename, 'rb') as f: + with open(fihopperme, 'rb') as f: loaded_im = pickle.load(f) # Assert self.assertEqual(im, loaded_im) def helper_pickle_string( - self, pickle, protocol=0, file='Tests/images/lena.jpg'): + self, pickle, protocol=0, file='Tests/images/hopper.jpg'): im = Image.open(file) # Act diff --git a/Tests/threaded_save.py b/Tests/threaded_save.py index 12fcff2cf..14ef42f17 100644 --- a/Tests/threaded_save.py +++ b/Tests/threaded_save.py @@ -9,7 +9,7 @@ try: except: format = "PNG" -im = Image.open("Tests/images/lena.ppm") +im = Image.open("Tests/images/hopper.ppm") im.load() queue = queue.Queue() From 19f13c2bdda4cb3e6eafcbf57547971d8da206a5 Mon Sep 17 00:00:00 2001 From: hugovk Date: Fri, 5 Sep 2014 13:04:26 +0300 Subject: [PATCH 05/25] Temporarily disable fail-fast so we can see all failures --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2ce1827e5..b89406fc0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -39,7 +39,7 @@ script: - coverage run --append --include=PIL/* selftest.py # FIXME: re-add -x option to fail fast # - coverage run --append --include=PIL/* -m nose -vx Tests/test_*.py - - coverage run --append --include=PIL/* -m nose -vx Tests/test_*.py + - coverage run --append --include=PIL/* -m nose -v Tests/test_*.py after_success: # gather the coverage data From 94da23ea3b2a7b71bc320fd1768e0c11e44d4c31 Mon Sep 17 00:00:00 2001 From: hugovk Date: Sun, 14 Sep 2014 20:00:13 +0300 Subject: [PATCH 06/25] Fix tests. test_trns_p() needed assert_image_similar() in place of assert_image_equal() --- Tests/test_file_png.py | 3 ++- Tests/test_image_getcolors.py | 27 +++++++++++++-------------- Tests/test_image_getdata.py | 18 +++++++++--------- Tests/test_image_getextrema.py | 14 +++++++------- Tests/test_image_histogram.py | 14 +++++++------- Tests/test_imagestat.py | 10 +++++----- 6 files changed, 43 insertions(+), 43 deletions(-) diff --git a/Tests/test_file_png.py b/Tests/test_file_png.py index 32dc10cd1..e4d495330 100644 --- a/Tests/test_file_png.py +++ b/Tests/test_file_png.py @@ -347,7 +347,8 @@ class TestFilePng(PillowTestCase): im2 = Image.open(f) self.assertIn('transparency', im2.info) - self.assert_image_equal(im2.convert('RGBA'), im.convert('RGBA')) + self.assert_image_similar(im2.convert('RGBA'), im.convert('RGBA'), + 16) def test_save_icc_profile_none(self): # check saving files with an ICC profile set to None (omit profile) diff --git a/Tests/test_image_getcolors.py b/Tests/test_image_getcolors.py index f3586565a..8886762c7 100644 --- a/Tests/test_image_getcolors.py +++ b/Tests/test_image_getcolors.py @@ -16,25 +16,25 @@ class TestImageGetColors(PillowTestCase): return None self.assertEqual(getcolors("1"), 2) - self.assertEqual(getcolors("L"), 193) - self.assertEqual(getcolors("I"), 193) - self.assertEqual(getcolors("F"), 193) - self.assertEqual(getcolors("P"), 54) # fixed palette + self.assertEqual(getcolors("L"), 255) + self.assertEqual(getcolors("I"), 255) + self.assertEqual(getcolors("F"), 255) + self.assertEqual(getcolors("P"), 90) # fixed palette self.assertEqual(getcolors("RGB"), None) self.assertEqual(getcolors("RGBA"), None) self.assertEqual(getcolors("CMYK"), None) self.assertEqual(getcolors("YCbCr"), None) self.assertEqual(getcolors("L", 128), None) - self.assertEqual(getcolors("L", 1024), 193) + self.assertEqual(getcolors("L", 1024), 255) self.assertEqual(getcolors("RGB", 8192), None) - self.assertEqual(getcolors("RGB", 16384), 14836) - self.assertEqual(getcolors("RGB", 100000), 14836) + self.assertEqual(getcolors("RGB", 16384), 10100) + self.assertEqual(getcolors("RGB", 100000), 10100) - self.assertEqual(getcolors("RGBA", 16384), 14836) - self.assertEqual(getcolors("CMYK", 16384), 14836) - self.assertEqual(getcolors("YCbCr", 16384), 11995) + self.assertEqual(getcolors("RGBA", 16384), 10100) + self.assertEqual(getcolors("CMYK", 16384), 10100) + self.assertEqual(getcolors("YCbCr", 16384), 9329) # -------------------------------------------------------------------- @@ -43,10 +43,9 @@ class TestImageGetColors(PillowTestCase): im = hopper().quantize(3).convert("RGB") - expected = [ - (3236, (227, 183, 147)), - (6297, (143, 84, 81)), - (6851, (208, 143, 112))] + expected = [(4039, (172, 166, 181)), + (4385, (124, 113, 134)), + (7960, (31, 20, 33))] A = im.getcolors(maxcolors=2) self.assertEqual(A, None) diff --git a/Tests/test_image_getdata.py b/Tests/test_image_getdata.py index bc925420d..89bfda895 100644 --- a/Tests/test_image_getdata.py +++ b/Tests/test_image_getdata.py @@ -10,7 +10,7 @@ class TestImageGetData(PillowTestCase): len(data) list(data) - self.assertEqual(data[0], (223, 162, 133)) + self.assertEqual(data[0], (20, 20, 70)) def test_roundtrip(self): @@ -19,14 +19,14 @@ class TestImageGetData(PillowTestCase): data = im.getdata() return data[0], len(data), len(list(data)) - self.assertEqual(getdata("1"), (255, 960, 960)) - self.assertEqual(getdata("L"), (176, 960, 960)) - self.assertEqual(getdata("I"), (176, 960, 960)) - self.assertEqual(getdata("F"), (176.0, 960, 960)) - self.assertEqual(getdata("RGB"), ((223, 162, 133), 960, 960)) - self.assertEqual(getdata("RGBA"), ((223, 162, 133, 255), 960, 960)) - self.assertEqual(getdata("CMYK"), ((32, 93, 122, 0), 960, 960)) - self.assertEqual(getdata("YCbCr"), ((176, 103, 160), 960, 960)) + self.assertEqual(getdata("1"), (0, 960, 960)) + self.assertEqual(getdata("L"), (25, 960, 960)) + self.assertEqual(getdata("I"), (25, 960, 960)) + self.assertEqual(getdata("F"), (25.0, 960, 960)) + self.assertEqual(getdata("RGB"), (((20, 20, 70), 960, 960))) + self.assertEqual(getdata("RGBA"), ((20, 20, 70, 255), 960, 960)) + self.assertEqual(getdata("CMYK"), ((235, 235, 185, 0), 960, 960)) + self.assertEqual(getdata("YCbCr"), ((25, 153, 123), 960, 960)) if __name__ == '__main__': diff --git a/Tests/test_image_getextrema.py b/Tests/test_image_getextrema.py index 066d563c4..84d932a98 100644 --- a/Tests/test_image_getextrema.py +++ b/Tests/test_image_getextrema.py @@ -9,16 +9,16 @@ class TestImageGetExtrema(PillowTestCase): return hopper(mode).getextrema() self.assertEqual(extrema("1"), (0, 255)) - self.assertEqual(extrema("L"), (40, 235)) - self.assertEqual(extrema("I"), (40, 235)) - self.assertEqual(extrema("F"), (40.0, 235.0)) - self.assertEqual(extrema("P"), (11, 218)) # fixed palette + self.assertEqual(extrema("L"), (0, 255)) + self.assertEqual(extrema("I"), (0, 255)) + self.assertEqual(extrema("F"), (0, 255)) + self.assertEqual(extrema("P"), (0, 225)) # fixed palette self.assertEqual( - extrema("RGB"), ((61, 255), (26, 234), (44, 223))) + extrema("RGB"), ((0, 255), (0, 255), (0, 255))) self.assertEqual( - extrema("RGBA"), ((61, 255), (26, 234), (44, 223), (255, 255))) + extrema("RGBA"), ((0, 255), (0, 255), (0, 255), (255, 255))) self.assertEqual( - extrema("CMYK"), ((0, 194), (21, 229), (32, 211), (0, 0))) + extrema("CMYK"), (((0, 255), (0, 255), (0, 255), (0, 0)))) if __name__ == '__main__': diff --git a/Tests/test_image_histogram.py b/Tests/test_image_histogram.py index 4bf8d2f80..aa849a138 100644 --- a/Tests/test_image_histogram.py +++ b/Tests/test_image_histogram.py @@ -9,15 +9,15 @@ class TestImageHistogram(PillowTestCase): h = hopper(mode).histogram() return len(h), min(h), max(h) - self.assertEqual(histogram("1"), (256, 0, 8872)) - self.assertEqual(histogram("L"), (256, 0, 199)) - self.assertEqual(histogram("I"), (256, 0, 199)) - self.assertEqual(histogram("F"), (256, 0, 199)) - self.assertEqual(histogram("P"), (256, 0, 2912)) - self.assertEqual(histogram("RGB"), (768, 0, 285)) + self.assertEqual(histogram("1"), (256, 0, 10994)) + self.assertEqual(histogram("L"), (256, 0, 638)) + self.assertEqual(histogram("I"), (256, 0, 638)) + self.assertEqual(histogram("F"), (256, 0, 638)) + self.assertEqual(histogram("P"), (256, 0, 1871)) + self.assertEqual(histogram("RGB"), (768, 4, 675)) self.assertEqual(histogram("RGBA"), (1024, 0, 16384)) self.assertEqual(histogram("CMYK"), (1024, 0, 16384)) - self.assertEqual(histogram("YCbCr"), (768, 0, 741)) + self.assertEqual(histogram("YCbCr"), (768, 0, 1908)) if __name__ == '__main__': diff --git a/Tests/test_imagestat.py b/Tests/test_imagestat.py index fbb96599a..4d5e42b3f 100644 --- a/Tests/test_imagestat.py +++ b/Tests/test_imagestat.py @@ -35,11 +35,11 @@ class TestImageStat(PillowTestCase): st = ImageStat.Stat(im) # verify a few values - self.assertEqual(st.extrema[0], (61, 255)) - self.assertEqual(st.median[0], 197) - self.assertEqual(st.sum[0], 2954416) - self.assertEqual(st.sum[1], 2027250) - self.assertEqual(st.sum[2], 1727331) + self.assertEqual(st.extrema[0], (0, 255)) + self.assertEqual(st.median[0], 72) + self.assertEqual(st.sum[0], 1470218) + self.assertEqual(st.sum[1], 1311896) + self.assertEqual(st.sum[2], 1563008) def test_constant(self): From f10bdf7cd10ba8001c4b13fc1c51c46821f91c34 Mon Sep 17 00:00:00 2001 From: hugovk Date: Sun, 14 Sep 2014 21:21:16 +0300 Subject: [PATCH 07/25] Fix test --- 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 885893bbe..c4111d0b6 100644 --- a/Tests/test_image_transform.py +++ b/Tests/test_image_transform.py @@ -32,7 +32,7 @@ class TestImageTransform(PillowTestCase): scaled = im.resize((w*2, h*2), Image.BILINEAR).crop((0, 0, w, h)) # undone -- precision? - self.assert_image_similar(transformed, scaled, 10) + self.assert_image_similar(transformed, scaled, 23) def test_quad(self): # one simple quad transform, equivalent to scale & crop upper left quad From 337b2224381a96569e344e1ee7fa29d5d3282305 Mon Sep 17 00:00:00 2001 From: hugovk Date: Sun, 14 Sep 2014 21:44:29 +0300 Subject: [PATCH 08/25] Add note to lena()/hopper() functions --- Tests/helper.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Tests/helper.py b/Tests/helper.py index 34dafa645..3d875983e 100644 --- a/Tests/helper.py +++ b/Tests/helper.py @@ -180,6 +180,7 @@ def tostring(im, format, **options): return out.getvalue() +# Note: hopper() should be used in place of lena(), which will be removed. def hopper(mode="RGB", cache={}): from PIL import Image im = None @@ -200,6 +201,7 @@ def hopper(mode="RGB", cache={}): return im +# Note: hopper() should be used instead lena(), which will be removed. def lena(mode="RGB", cache={}): from PIL import Image im = None From ba696ab7f8eae98881e218667e573fc89905cf63 Mon Sep 17 00:00:00 2001 From: hugovk Date: Sun, 14 Sep 2014 21:46:55 +0300 Subject: [PATCH 09/25] Re-enable fail fast for tests --- .travis.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index b89406fc0..704c0d949 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,9 +37,7 @@ script: - CFLAGS="-coverage" python setup.py build_ext --inplace - coverage run --append --include=PIL/* selftest.py - # FIXME: re-add -x option to fail fast - # - coverage run --append --include=PIL/* -m nose -vx Tests/test_*.py - - coverage run --append --include=PIL/* -m nose -v Tests/test_*.py + - coverage run --append --include=PIL/* -m nose -vx Tests/test_*.py after_success: # gather the coverage data From bdf845d6df8dbc73af98ebb0f55d6754c27cec98 Mon Sep 17 00:00:00 2001 From: hugovk Date: Mon, 15 Sep 2014 08:59:28 +0300 Subject: [PATCH 10/25] Fix typo: fihopperme -> filename --- Tests/test_image_draft.py | 10 +++++----- Tests/test_mode_i16.py | 6 +++--- Tests/test_pickle.py | 7 ++++--- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/Tests/test_image_draft.py b/Tests/test_image_draft.py index c7cd90e95..68676687c 100644 --- a/Tests/test_image_draft.py +++ b/Tests/test_image_draft.py @@ -2,13 +2,13 @@ from helper import unittest, PillowTestCase, fromstring, tostring from PIL import Image -codecs = dir(Image.core) -fihopperme = "Tests/images/hopper.jpg" -data = tostring(Image.open(fihopperme).resize((512, 512)), "JPEG") +CODECS = dir(Image.core) +FILENAME = "Tests/images/hopper.jpg" +DATA = tostring(Image.open(FILENAME).resize((512, 512)), "JPEG") def draft(mode, size): - im = fromstring(data) + im = fromstring(DATA) im.draft(mode, size) return im @@ -16,7 +16,7 @@ def draft(mode, size): class TestImageDraft(PillowTestCase): def setUp(self): - if "jpeg_encoder" not in codecs or "jpeg_decoder" not in codecs: + if "jpeg_encoder" not in CODECS or "jpeg_decoder" not in CODECS: self.skipTest("jpeg support not available") def test_size(self): diff --git a/Tests/test_mode_i16.py b/Tests/test_mode_i16.py index 4c6c181a8..0bd2b9a86 100644 --- a/Tests/test_mode_i16.py +++ b/Tests/test_mode_i16.py @@ -39,10 +39,10 @@ class TestModeI16(PillowTestCase): imOut = imIn.transform((w, h), Image.EXTENT, (0, 0, w, h)) self.verify(imOut) # transform - fihopperme = self.tempfile("temp.im") - imIn.save(fihopperme) + filename = self.tempfile("temp.im") + imIn.save(filename) - imOut = Image.open(fihopperme) + imOut = Image.open(filename) self.verify(imIn) self.verify(imOut) diff --git a/Tests/test_pickle.py b/Tests/test_pickle.py index 595141cb7..59dfd5948 100644 --- a/Tests/test_pickle.py +++ b/Tests/test_pickle.py @@ -6,13 +6,14 @@ from PIL import Image class TestPickle(PillowTestCase): def helper_pickle_file(self, pickle, protocol=0): + # Arrange im = Image.open('Tests/images/hopper.jpg') - fihopperme = self.tempfile('temp.pkl') + filename = self.tempfile('temp.pkl') # Act - with open(fihopperme, 'wb') as f: + with open(filename, 'wb') as f: pickle.dump(im, f, protocol) - with open(fihopperme, 'rb') as f: + with open(filename, 'rb') as f: loaded_im = pickle.load(f) # Assert From 99887a546763c950233f691cf5dd0107f38cfc81 Mon Sep 17 00:00:00 2001 From: Hugo Date: Tue, 16 Sep 2014 16:05:22 +0300 Subject: [PATCH 11/25] Improve the error message when importing ImageGrab on non-Windows (#901) --- PIL/ImageGrab.py | 5 ++++- Tests/test_imagegrab.py | 25 +++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/PIL/ImageGrab.py b/PIL/ImageGrab.py index 9bb190934..ef0135334 100644 --- a/PIL/ImageGrab.py +++ b/PIL/ImageGrab.py @@ -17,6 +17,9 @@ from PIL import Image +import sys +if sys.platform != "win32": + raise ImportError("ImageGrab is Windows only") try: # built-in driver (1.1.3 and later) @@ -40,7 +43,7 @@ def grab(bbox=None): def grabclipboard(): - debug = 0 # temporary interface + debug = 0 # temporary interface data = Image.core.grabclipboard(debug) if isinstance(data, bytes): from PIL import BmpImagePlugin diff --git a/Tests/test_imagegrab.py b/Tests/test_imagegrab.py index 13affe6b9..dd6f50fb9 100644 --- a/Tests/test_imagegrab.py +++ b/Tests/test_imagegrab.py @@ -1,5 +1,8 @@ from helper import unittest, PillowTestCase +import exceptions +import sys + try: from PIL import ImageGrab @@ -19,6 +22,28 @@ except ImportError: self.skipTest("ImportError") +class TestImageGrabImport(PillowTestCase): + + def test_import(self): + # Arrange + exception = None + + # Act + try: + from PIL import ImageGrab + ImageGrab.__name__ # dummy to prevent Pyflakes warning + except Exception as exception: + pass + + # Assert + if sys.platform == 'win32': + self.assertIsNone(exception, None) + else: + self.assertIsInstance(exception, exceptions.ImportError) + self.assertEqual(exception.message, + "ImageGrab is Windows only") + + if __name__ == '__main__': unittest.main() From 300a3f0e70c5399e8401f1770cc5c35d99e18789 Mon Sep 17 00:00:00 2001 From: Hugo Date: Tue, 16 Sep 2014 16:44:51 +0300 Subject: [PATCH 12/25] Fix for Python 3 --- Tests/test_imagegrab.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Tests/test_imagegrab.py b/Tests/test_imagegrab.py index dd6f50fb9..e1c35ac4e 100644 --- a/Tests/test_imagegrab.py +++ b/Tests/test_imagegrab.py @@ -1,6 +1,5 @@ from helper import unittest, PillowTestCase -import exceptions import sys try: @@ -39,7 +38,7 @@ class TestImageGrabImport(PillowTestCase): if sys.platform == 'win32': self.assertIsNone(exception, None) else: - self.assertIsInstance(exception, exceptions.ImportError) + self.assertIsInstance(exception, ImportError) self.assertEqual(exception.message, "ImageGrab is Windows only") From 311a0c6f68f2600bcd5ce7e35c66339d5400ce4a Mon Sep 17 00:00:00 2001 From: Hugo Date: Tue, 16 Sep 2014 17:19:15 +0300 Subject: [PATCH 13/25] Another Python 3 fix --- Tests/test_imagegrab.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tests/test_imagegrab.py b/Tests/test_imagegrab.py index e1c35ac4e..ec4572adb 100644 --- a/Tests/test_imagegrab.py +++ b/Tests/test_imagegrab.py @@ -31,8 +31,8 @@ class TestImageGrabImport(PillowTestCase): try: from PIL import ImageGrab ImageGrab.__name__ # dummy to prevent Pyflakes warning - except Exception as exception: - pass + except Exception as e: + exception = e # Assert if sys.platform == 'win32': From e5a068de53c6b44aa8be6c5145da1a727b38202d Mon Sep 17 00:00:00 2001 From: Hugo Date: Tue, 16 Sep 2014 17:41:03 +0300 Subject: [PATCH 14/25] Yet another Python 3 fix --- Tests/test_imagegrab.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Tests/test_imagegrab.py b/Tests/test_imagegrab.py index ec4572adb..ea6b499b2 100644 --- a/Tests/test_imagegrab.py +++ b/Tests/test_imagegrab.py @@ -39,8 +39,7 @@ class TestImageGrabImport(PillowTestCase): self.assertIsNone(exception, None) else: self.assertIsInstance(exception, ImportError) - self.assertEqual(exception.message, - "ImageGrab is Windows only") + self.assertEqual(str(exception), "ImageGrab is Windows only") if __name__ == '__main__': From 45073c85d6ae14670ac86c6776e6b8c6dcd9a07a Mon Sep 17 00:00:00 2001 From: Hugo Date: Wed, 17 Sep 2014 10:06:57 +0300 Subject: [PATCH 15/25] Remove Landscape badge until Landscape fixed Pillow isn't at 100% code health, there's plenty of PEP8 and Pyflakes warnings in our Travis CI. This is a bug in Landscape: https://github.com/landscapeio/landscape-issues/issues/70 Let's remove the badge until Landscape's working properly. Re: #895. --- README.rst | 4 ---- 1 file changed, 4 deletions(-) diff --git a/README.rst b/README.rst index d58666bc6..a5cb77785 100644 --- a/README.rst +++ b/README.rst @@ -19,7 +19,3 @@ Pillow is the "friendly" PIL fork by `Alex Clark and Contributors Date: Wed, 17 Sep 2014 20:24:34 +0300 Subject: [PATCH 16/25] Mention Coveralls [CI skip] --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a31c9ee09..30c375a17 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -7,7 +7,7 @@ Send a pull request. We'll generally want documentation and [tests](Tests/README - Fork the repo - Make a branch - Add your changes + Tests -- Run the test suite. Try to run on both Python 2.x and 3.x, or you'll get tripped up. You can enable [Travis CI on your repo](https://travis-ci.org/profile/) to catch test failures prior to the pull request. +- Run the test suite. Try to run on both Python 2.x and 3.x, or you'll get tripped up. You can enable [Travis CI on your repo](https://travis-ci.org/profile/) to catch test failures prior to the pull request, and [Coveralls](https://coveralls.io/repos/new) to see if the changed code is covered by tests. - Push to your fork, and make a pull request. A few guidelines: From c85e0e915b3bd5f40814ec1ebdcff2b6d3b860d8 Mon Sep 17 00:00:00 2001 From: Jim Garrison Date: Wed, 17 Sep 2014 21:36:59 -0700 Subject: [PATCH 17/25] Image.close() docstring: use correct "its" --- PIL/Image.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PIL/Image.py b/PIL/Image.py index cd1e450ee..a7491fd83 100644 --- a/PIL/Image.py +++ b/PIL/Image.py @@ -530,7 +530,7 @@ class Image: """ Closes the file pointer, if possible. - This operation will destroy the image core and release it's memory. + This operation will destroy the image core and release its memory. The image data will be unusable afterward. This function is only required to close images that have not From 758c8930679a5d123bfac267a345d1b93949f1cc Mon Sep 17 00:00:00 2001 From: wiredfool Date: Thu, 18 Sep 2014 08:46:22 -0700 Subject: [PATCH 18/25] Convert lena->hopper --- Tests/test_imageenhance.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Tests/test_imageenhance.py b/Tests/test_imageenhance.py index 433c49cf6..5edf46b12 100644 --- a/Tests/test_imageenhance.py +++ b/Tests/test_imageenhance.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, lena +from helper import unittest, PillowTestCase, hopper from PIL import Image from PIL import ImageEnhance @@ -10,10 +10,10 @@ class TestImageEnhance(PillowTestCase): # FIXME: assert_image # Implicit asserts no exception: - ImageEnhance.Color(lena()).enhance(0.5) - ImageEnhance.Contrast(lena()).enhance(0.5) - ImageEnhance.Brightness(lena()).enhance(0.5) - ImageEnhance.Sharpness(lena()).enhance(0.5) + ImageEnhance.Color(hopper()).enhance(0.5) + ImageEnhance.Contrast(hopper()).enhance(0.5) + ImageEnhance.Brightness(hopper()).enhance(0.5) + ImageEnhance.Sharpness(hopper()).enhance(0.5) def test_crash(self): From 5ea966d8698ff2adcff9b514f053babc7463450f Mon Sep 17 00:00:00 2001 From: wiredfool Date: Thu, 18 Sep 2014 08:49:13 -0700 Subject: [PATCH 19/25] Test for alpha preservation in ImageEnhance, #899 --- Tests/test_imageenhance.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/Tests/test_imageenhance.py b/Tests/test_imageenhance.py index 5edf46b12..58042db85 100644 --- a/Tests/test_imageenhance.py +++ b/Tests/test_imageenhance.py @@ -22,6 +22,34 @@ class TestImageEnhance(PillowTestCase): ImageEnhance.Sharpness(im).enhance(0.5) + def _half_transparent_image(self): + # returns an image, half transparent, half solid + im = hopper('RGB') + + transparent = Image.new('L', im.size, 0) + solid = Image.new('L', (im.size[0]//2, im.size[1]), 255) + transparent.paste(solid, (0,0)) + im.putalpha(transparent) + + return im + + def _check_alpha(self,im, original, op, amount): + self.assertEqual(im.getbands(), original.getbands()) + self.assert_image_equal(im.split()[-1], original.split()[-1], + "Diff on %s: %s" % (op, amount)) + + def test_alpha(self): + # Issue https://github.com/python-pillow/Pillow/issues/899 + # Is alpha preserved through image enhancement? + + original = self._half_transparent_image() + + for op in ['Color', 'Brightness', 'Contrast', 'Sharpness']: + for amount in [0,0.5,1.0]: + self._check_alpha(getattr(ImageEnhance,op)(original).enhance(amount), + original, op, amount) + + if __name__ == '__main__': unittest.main() From 394f6d32491bb7e0a0c87545e49768476bbc2793 Mon Sep 17 00:00:00 2001 From: wiredfool Date: Thu, 18 Sep 2014 08:49:37 -0700 Subject: [PATCH 20/25] Fix for alpha preservation in ImageEnhance, #899 --- PIL/ImageEnhance.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/PIL/ImageEnhance.py b/PIL/ImageEnhance.py index f802dc1d3..a196d5b09 100644 --- a/PIL/ImageEnhance.py +++ b/PIL/ImageEnhance.py @@ -47,8 +47,11 @@ class Color(_Enhance): """ def __init__(self, image): self.image = image - self.degenerate = image.convert("L").convert(image.mode) + self.intermediate_mode = 'L' + if 'A' in image.getbands(): + self.intermediate_mode = 'LA' + self.degenerate = image.convert(self.intermediate_mode).convert(image.mode) class Contrast(_Enhance): """Adjust image contrast. @@ -62,6 +65,9 @@ class Contrast(_Enhance): mean = int(ImageStat.Stat(image.convert("L")).mean[0] + 0.5) self.degenerate = Image.new("L", image.size, mean).convert(image.mode) + if 'A' in image.getbands(): + self.degenerate.putalpha(image.split()[-1]) + class Brightness(_Enhance): """Adjust image brightness. @@ -74,6 +80,9 @@ class Brightness(_Enhance): self.image = image self.degenerate = Image.new(image.mode, image.size, 0) + if 'A' in image.getbands(): + self.degenerate.putalpha(image.split()[-1]) + class Sharpness(_Enhance): """Adjust image sharpness. @@ -85,3 +94,6 @@ class Sharpness(_Enhance): def __init__(self, image): self.image = image self.degenerate = image.filter(ImageFilter.SMOOTH) + + if 'A' in image.getbands(): + self.degenerate.putalpha(image.split()[-1]) From 516957bfa6e5418efb0edd178cd11b6b04fd1536 Mon Sep 17 00:00:00 2001 From: Hugo Date: Fri, 19 Sep 2014 09:53:21 +0300 Subject: [PATCH 21/25] Update CHANGES.rst [CI skip] --- CHANGES.rst | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index cc92eba8d..5aa419ef9 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,13 +4,16 @@ Changelog (Pillow) 2.6.0 (unreleased) ------------------ -- Jpeg2k Decode/Encode Memory Leak Fix #898 +- Retain alpha in ImageEnhance operations #909 + [wiredfool] + +- Jpeg2k Decode/encode memory leak fix #898 [joshware, wiredfool] - EpsFilePlugin Speed improvements #886 [wiredfool, karstenw] -- Don't resize if already the right size. +- Don't resize if already the right size #892 [radarhere] - Fix for reading multipage TIFFs #885 From af672b1d7e8a4545400777acdd6ce514f37d6cee Mon Sep 17 00:00:00 2001 From: wiredfool Date: Sat, 20 Sep 2014 10:27:52 -0700 Subject: [PATCH 22/25] Fix for handling P + transparency -> RGBA conversions --- PIL/Image.py | 10 ++++++++++ Tests/test_file_png.py | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/PIL/Image.py b/PIL/Image.py index 5e1416a33..058511b18 100644 --- a/PIL/Image.py +++ b/PIL/Image.py @@ -867,7 +867,17 @@ class Image: trns = trns_im.getpixel((0,0)) elif self.mode == 'P' and mode == 'RGBA': + t = self.info['transparency'] delete_trns = True + + if isinstance(t, bytes): + self.im.putpalettealphas(t) + elif isinstance(t, int): + self.im.putpalettealpha(t,0) + else: + raise ValueError("Transparency for P mode should" + + " be bytes or int") + if mode == "P" and palette == ADAPTIVE: im = self.im.quantize(colors) diff --git a/Tests/test_file_png.py b/Tests/test_file_png.py index e4d495330..b8f5ceb08 100644 --- a/Tests/test_file_png.py +++ b/Tests/test_file_png.py @@ -347,8 +347,8 @@ class TestFilePng(PillowTestCase): im2 = Image.open(f) self.assertIn('transparency', im2.info) - self.assert_image_similar(im2.convert('RGBA'), im.convert('RGBA'), - 16) + self.assert_image_equal(im2.convert('RGBA'), + im.convert('RGBA')) def test_save_icc_profile_none(self): # check saving files with an ICC profile set to None (omit profile) From f3e3af66865a7d4cadb3eeaa79af417401aa740b Mon Sep 17 00:00:00 2001 From: Christoph Gohlke Date: Sun, 21 Sep 2014 16:48:35 -0700 Subject: [PATCH 23/25] Fix msvc build error --- libImaging/TiffDecode.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libImaging/TiffDecode.c b/libImaging/TiffDecode.c index 1d320e9bd..76bd887a7 100644 --- a/libImaging/TiffDecode.c +++ b/libImaging/TiffDecode.c @@ -221,9 +221,10 @@ int ImagingLibTiffDecode(Imaging im, ImagingCodecState state, UINT8* buffer, int } if (clientstate->ifd){ - unsigned int ifdoffset = clientstate->ifd; + int rv; + unsigned int ifdoffset = clientstate->ifd; TRACE(("reading tiff ifd %d\n", ifdoffset)); - int rv = TIFFSetSubDirectory(tiff, ifdoffset); + rv = TIFFSetSubDirectory(tiff, ifdoffset); if (!rv){ TRACE(("error in TIFFSetSubDirectory")); return -1; From 09ba5560d8a94dc2f633e7bc11df214e0298df74 Mon Sep 17 00:00:00 2001 From: Christoph Gohlke Date: Sun, 21 Sep 2014 17:50:07 -0700 Subject: [PATCH 24/25] On Windows, do not execute convert.exe without specifying path Convert.exe is a system tool that converts file systems --- Tests/helper.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Tests/helper.py b/Tests/helper.py index 3d875983e..e510f307c 100644 --- a/Tests/helper.py +++ b/Tests/helper.py @@ -155,7 +155,7 @@ class PillowTestCase(unittest.TestCase): raise IOError() outfile = self.tempfile("temp.png") - if command_succeeds(['convert', f, outfile]): + if command_succeeds([IMCONVERT, f, outfile]): from PIL import Image return Image.open(outfile) raise IOError() @@ -251,6 +251,14 @@ def netpbm_available(): def imagemagick_available(): - return command_succeeds(['convert', '-version']) + return IMCONVERT and command_succeeds([IMCONVERT, '-version']) + + +if sys.platform == 'win32': + IMCONVERT = os.environ.get('MAGICK_HOME', '') + if IMCONVERT: + IMCONVERT = os.path.join(IMCONVERT, 'convert.exe') +else: + IMCONVERT = 'convert' # End of file From d328b4832019508cbad93a9d95535be60c16f0a1 Mon Sep 17 00:00:00 2001 From: Hugo Date: Mon, 22 Sep 2014 09:42:31 +0300 Subject: [PATCH 25/25] Update CHANGES.rst [CI skip] --- CHANGES.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 5aa419ef9..cd00ce285 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,6 +4,15 @@ Changelog (Pillow) 2.6.0 (unreleased) ------------------ +- On Windows, do not execute convert.exe without specifying path #912 + [cgohlke] + +- Fix msvc build error #911 + [cgohlke] + +- Fix for handling P + transparency -> RGBA conversions #904 + [wiredfool] + - Retain alpha in ImageEnhance operations #909 [wiredfool]