mirror of
https://github.com/Hopiu/django-imagekit.git
synced 2026-03-17 05:40:25 +00:00
parent
57056c021d
commit
75db5db073
1 changed files with 3 additions and 4 deletions
|
|
@ -152,10 +152,9 @@ class Crop(object):
|
|||
|
||||
# If the user passed in one of the string values, convert it to a
|
||||
# percentage tuple.
|
||||
if self.anchor in Crop._ANCHOR_PTS.keys():
|
||||
anchor = Crop._ANCHOR_PTS[self.anchor]
|
||||
else:
|
||||
anchor = self.anchor
|
||||
anchor = self.anchor or Crop.CENTER
|
||||
if anchor in Crop._ANCHOR_PTS.keys():
|
||||
anchor = Crop._ANCHOR_PTS[anchor]
|
||||
|
||||
x = int(float(trim_x) * float(anchor[0]))
|
||||
y = int(float(trim_y) * float(anchor[1]))
|
||||
|
|
|
|||
Loading…
Reference in a new issue