-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
Milestone
Description
In very specific case resizing with cropping set to sharp.strategy.attention
or sharp.strategy.entropy
will result with error smartcrop: bad extract area
Repository to reproduce - https://github.com/pieh/sharp-smartcrop-bad-extract-area-repro
This happens when width
is set to 1110
and height
is unspecified using image from above repository (it is 1600 x 1200)
In readme of repository I placed more outputs where it works fine:
- with crop set to
sharp.gravity.center
- with slightly higher and lower widths (
1120
and1100
respectively) - with specified height (both calculated using source image aspect ratio and full image height)
This was originally reported in gatsbyjs/gatsby#4142 (just to keep paper trail - reproduction repository should be enough)