You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to know what coordinates are being considered when cropping with the "attention" strategy
Have you searched for similar feature requests?
Yes, but I couldn't find anything.
What would you expect the API to look like?
Maybe something like
sharp("input.png").resize({width: 200,height: 200,fit: sharp.fit.cover,position: sharp.strategy.attention,explain: true// or dryRun? something to tell sharp that we don't actually want to do the resize. // this could just be a wholly new method, like `resizePlan` with the same API as `.resize()`?})
which would return some sort of struct with information used by the crop algorithm, like
Thanks again for sharp, @lovell ! 馃挴 馃
What are you trying to achieve?
I'd like to know what coordinates are being considered when cropping with the "attention" strategy
Have you searched for similar feature requests?
Yes, but I couldn't find anything.
What would you expect the API to look like?
Maybe something like
which would return some sort of struct with information used by the crop algorithm, like
What alternatives have you considered?
I could try to pixel-match the cropped result with the same image reduced by the same amount, but that would be expensive.
If you think this request is reasonable, I'd be happy to finalize the API with you and submit a PR.
The text was updated successfully, but these errors were encountered: