Closed garygreen closed 3 years ago
@Gregwar any news on this?
@Gregwar please can you respond? This is really needed in our app
Sorry for the huge delay Thanks for contributing
Thank you! 😁
Will you need a new version tag?
Yes please. This PR is fully backwards compatible, there's no breaking changes. So should only need a minor version bump
Currently, when you use
zoomCrop()
you cannot set custom cropping position other than basic left / right, top / bottom, center.With this PR, you can set a target cropping "zone" as it were (based on the original dimensions of the image) and it will try to crop from that area. It also handles if the given cropping position will result in a crop outside the bounds by forcing it stay within the bounds of the image (maybe that could be configured, if people really want it to crop outside for some reason?)
My use case: I use a library to do face detection which returns a X, Y coords of the face. I want to zoomCrop around that area but currently that is not easily possible, this PR allows such a use case and others.