try to deal with different libjpeg version

This commit is contained in:
Alexander 2019-11-24 15:34:12 +03:00
parent e234445682
commit c23f29481c

View File

@ -50,11 +50,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", (97, 97), "red") im = Image.new("RGB", (257, 257), "red")
im.paste(Image.new("RGB", (95, 95)), (1, 1)) im.paste(Image.new("RGB", (255, 255)), (1, 1))
thumb = fromstring(tostring(im, "JPEG", quality=95)) thumb = fromstring(tostring(im, "JPEG", quality=99, subsampling=0))
thumb.thumbnail((24, 24), Image.BICUBIC) thumb.thumbnail((32, 32), Image.BICUBIC)
ref = im.resize((24, 24), Image.BICUBIC) ref = im.resize((32, 32), Image.BICUBIC)
self.assert_image_similar(thumb, ref, 2) self.assert_image_similar(thumb, ref, 2)