Closed epetre closed 6 years ago
This works great on Android if you specify a square image, but if your targetWidth and targetHeight don't match, you get a freeform crop box :(
I took a quick peek, and it turns out the Android cropper has this:
public Crop withAspect(int x, int y) { cropIntent.putExtra(Extra.ASPECT_X, x); cropIntent.putExtra(Extra.ASPECT_Y, y); return this; }
Calling that with the specific width and height does lock it to that aspect. It doesn't restrict the size, but I think the aspect is the important bit...
if targetWidth has -1 value, targetWidth value is NSUInteger type is unsigned integer So I changed to NSInteger like this
@property (assign) NSInteger targetWidth; @property (assign) NSInteger targetHeight;
Thank you
@jerwarren & @hannut91 nice, yes true.
Just not sure if this project here is still alive.
It is also related to https://github.com/jeduan/cordova-plugin-crop/issues/2