Esempio n. 1
0
 def test_change_quality(self):
     image = scale_and_crop_single(self.image, (10, 10), quality=50)
     self.assertEqual(image.info.get('quality'), 50)
Esempio n. 2
0
 def test_disabled_upscale(self):
     image = scale_and_crop_single(self.image, (740, 740), upscale=False)
     self.assertLess(image.size[0], 371)
     self.assertLess(image.size[1], 371)
Esempio n. 3
0
 def test_enaabled_upscale(self):
     image = scale_and_crop_single(self.image, (740, 740), upscale=True)
     self.assertGreater(image.size[0], 371)
     self.assertGreater(image.size[1], 371)
Esempio n. 4
0
 def test_crop(self):
     new_size = (10, 10)
     image = scale_and_crop_single(self.image, new_size, crop=True)
     self.assertEqual(new_size, image.size)