mirror of
https://github.com/Hopiu/django-imagekit.git
synced 2026-05-15 00:03:10 +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
|
# If the user passed in one of the string values, convert it to a
|
||||||
# percentage tuple.
|
# percentage tuple.
|
||||||
if self.anchor in Crop._ANCHOR_PTS.keys():
|
anchor = self.anchor or Crop.CENTER
|
||||||
anchor = Crop._ANCHOR_PTS[self.anchor]
|
if anchor in Crop._ANCHOR_PTS.keys():
|
||||||
else:
|
anchor = Crop._ANCHOR_PTS[anchor]
|
||||||
anchor = self.anchor
|
|
||||||
|
|
||||||
x = int(float(trim_x) * float(anchor[0]))
|
x = int(float(trim_x) * float(anchor[0]))
|
||||||
y = int(float(trim_y) * float(anchor[1]))
|
y = int(float(trim_y) * float(anchor[1]))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue