mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-13 18:56:17 +03:00
modify the test image
This commit is contained in:
parent
a027897f74
commit
b35cbef234
|
@ -57,10 +57,11 @@ class TestImageThumbnail(PillowTestCase):
|
||||||
def test_DCT_scaling_edges(self):
|
def test_DCT_scaling_edges(self):
|
||||||
# Make an image with red borders and size (N * 8) + 1 to cross DCT grid
|
# Make an image with red borders and size (N * 8) + 1 to cross DCT grid
|
||||||
im = Image.new("RGB", (257, 257), "red")
|
im = Image.new("RGB", (257, 257), "red")
|
||||||
im.paste(Image.new("RGB", (255, 255)), (1, 1))
|
im.paste(Image.new("RGB", (235, 235)), (11, 11))
|
||||||
|
|
||||||
thumb = fromstring(tostring(im, "JPEG", quality=99, subsampling=0))
|
thumb = fromstring(tostring(im, "JPEG", quality=99, subsampling=0))
|
||||||
thumb.thumbnail((32, 32), Image.BICUBIC)
|
thumb.thumbnail((32, 32), Image.BICUBIC)
|
||||||
|
|
||||||
ref = im.resize((32, 32), Image.BICUBIC)
|
ref = im.resize((32, 32), Image.BICUBIC)
|
||||||
self.assert_image_similar(thumb, ref, 2)
|
# This is still JPEG, some error is present. Without the fix it is 11.5
|
||||||
|
self.assert_image_similar(thumb, ref, 1.5)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user