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
However, come to think of it, a better option would be to just create a separate, global cropImage function so it's not so tightly coupled to the readAndCompressImage function. That way, we keep single responsibility intact and doesn't confuse the API surface area of readAndCompressImage whose primary job already is to scale an image proportionally given a maximum height/width constraint.
This new cropImage function would probably take the crop property above as its config object and then do the necessary cropping work, e.g.
As for implementing this, I don't have much free time to do devote to this enhancement, so if you'd like to take a stab at a PR with the direction above, I can perhaps guide you through it? Otherwise, I can put it on deck for a future release when I have a bit more free time.
Thanks for this lib! :)
Is it hard to implement a quick crop based on options width/height and center on the image?
Thanks!
The text was updated successfully, but these errors were encountered: