mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-08 15:34:43 +00:00
Fix typo and slight PEP8 cleanup.
This commit is contained in:
parent
cd3431a57e
commit
23bbc1bcf9
1 changed files with 3 additions and 4 deletions
|
|
@ -112,7 +112,7 @@ class BaseImageBackend(object):
|
|||
if original_height <= target_height:
|
||||
return image
|
||||
|
||||
scale = target_height / original_hight
|
||||
scale = target_height / original_height
|
||||
|
||||
final_size = (int(original_width * scale), target_height)
|
||||
|
||||
|
|
@ -219,11 +219,11 @@ class BaseImageBackend(object):
|
|||
top = focal_point_top
|
||||
|
||||
if right < focal_point_right:
|
||||
left += focal_point_right - right;
|
||||
left += focal_point_right - right
|
||||
right = focal_point_right
|
||||
|
||||
if bottom < focal_point_bottom:
|
||||
top += focal_point_bottom - bottom;
|
||||
top += focal_point_bottom - bottom
|
||||
bottom = focal_point_bottom
|
||||
|
||||
# Don't allow the crop box to go over the image boundary
|
||||
|
|
@ -246,7 +246,6 @@ class BaseImageBackend(object):
|
|||
# Crop!
|
||||
return self.resize_to_min(self.crop(image, Rect(left, top, right, bottom)), size)
|
||||
|
||||
|
||||
def no_operation(self, image, param, focal_point=None):
|
||||
"""Return the image unchanged"""
|
||||
return image
|
||||
|
|
|
|||
Loading…
Reference in a new issue