Skip to content

Commit

Permalink
Fix cover=False not geting passed to scale_image
Browse files Browse the repository at this point in the history
  • Loading branch information
SmileyChris committed Aug 5, 2024
1 parent 031592e commit e710dbe
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions easy_images/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,13 @@ def build(
if not options:
options = ParsedOptions(**self.args)
if size := options.size:
scale_args = {}
if options.window:
scale_args["focal_window"] = options.window
if options.crop:
scale_args["crop"] = options.crop
if options.cover:
scale_args["cover"] = options.cover
img = engine.scale_image(source_img, size, **scale_args)
img = engine.scale_image(
source_img,
size,
focal_window=options.window,
crop=options.crop,
cover=options.cover,
)
else:
img = source_img
self.height = img.height
Expand Down

0 comments on commit e710dbe

Please sign in to comment.