This commit is contained in:
Leonel Câmara
2017-07-14 20:17:30 +01:00
parent 113df51ef9
commit b7b8a009f2
5 changed files with 16 additions and 16 deletions
+1 -1
View File
@@ -45,7 +45,7 @@ class RESIZE(object):
background = Image.new('RGBA', (self.nx, self.ny), (255, 255, 255, 0))
background.paste(
img,
((self.nx - img.size[0]) / 2, (self.ny - img.size[1]) / 2))
((self.nx - img.size[0]) // 2, (self.ny - img.size[1]) // 2))
background.save(s, 'JPEG', quality=self.quality)
else:
img.save(s, 'JPEG', quality=self.quality)