fix formatting

This commit is contained in:
Alexander 2019-12-20 20:30:23 +03:00
parent 8181aed77f
commit fc28182040
2 changed files with 3 additions and 3 deletions

View File

@ -189,7 +189,7 @@ class TestReducingGapResize(PillowTestCase):
for box, epsilon in [ for box, epsilon in [
(None, 1), (None, 1),
((1.1, 2.2, 510.8, 510.9), 1), ((1.1, 2.2, 510.8, 510.9), 1),
((3, 10, 410, 256), .5), ((3, 10, 410, 256), 0.5),
]: ]:
ref = self.gradients_image.resize((52, 34), Image.BICUBIC, box=box) ref = self.gradients_image.resize((52, 34), Image.BICUBIC, box=box)
im = self.gradients_image.resize( im = self.gradients_image.resize(
@ -209,7 +209,7 @@ class TestReducingGapResize(PillowTestCase):
) )
self.assert_image_equal(ref, im) self.assert_image_equal(ref, im)
def test_box_filter(self): def test_box_filter(self):
for box, epsilon in [ for box, epsilon in [
((0, 0, 512, 512), 5.5), ((0, 0, 512, 512), 5.5),

View File

@ -63,7 +63,7 @@ def _save(im, fp, filename):
fp.write(struct.pack("<H", 32)) # wBitCount(2) fp.write(struct.pack("<H", 32)) # wBitCount(2)
image_io = BytesIO() image_io = BytesIO()
# TODO: invent a more convenient method for proportional scalings than thumbnail() # TODO: invent a more convenient method for proportional scalings
tmp = im.copy() tmp = im.copy()
tmp.thumbnail(size, Image.LANCZOS, reducing_gap=None) tmp.thumbnail(size, Image.LANCZOS, reducing_gap=None)
tmp.save(image_io, "png") tmp.save(image_io, "png")