Fix minor bug with crop

This commit is contained in:
Serafeim Papastefanos 2014-03-11 19:49:01 +02:00
parent 11400e3df7
commit db65b22d5a
2 changed files with 5 additions and 4 deletions

View file

@ -128,5 +128,5 @@ class BaseImageBackend(object):
(The final image will match the requested size, unless one or the other dimension is
already smaller than the target size)
"""
resized_image = resize_to_min(image, size)
resized_image = self.resize_to_min(image, size)
return self.crop_to_centre(resized_image, size)

View file

@ -34,6 +34,7 @@ class WandBackend(BaseImageBackend):
left = (original_width - final_width) / 2
top = (original_height - final_height) / 2
return image.crop(
(left, top, left + final_width, top + final_height)
)
image.crop(
left=left, top=top, right=left + final_width, bottom=top + final_height
)
return image