sharp
sharp copied to clipboard
extract: add option to treat width and height as "maximum" rather than absolute values
If we try to extract more pixels than has an image - we will get "extract_area: bad extract area"
Can we ignore exception and extract an actual pixels? I don't want calculate if image.width < etc.. i suppose it should be in a core. May be additional option?
Good idea, we should improve the error handling at the same time to avoid making any calls into libvips that could generate the dread "bad extract area" error.
Happy to accept a PR if you're able.
A detailed error message would also help