Skip to content

Commit

Permalink
fix bug of ImageScaleByAspectRatioV2
Browse files Browse the repository at this point in the history
  • Loading branch information
chflame163 committed May 21, 2024
1 parent 23768cd commit cccf640
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion py/image_scale_by_aspect_ratio_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def image_scale_by_aspect_ratio(self, aspect_ratio, proportional_width, proporti
ratio = int(s[0]) / int(s[1])

# calculate target width and height
if orig_width > orig_height:
if ratio > 1:
if scale_to_side == 'longest':
target_width = scale_to_length
target_height = int(target_width / ratio)
Expand Down

0 comments on commit cccf640

Please sign in to comment.