-
Notifications
You must be signed in to change notification settings - Fork 329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
x/y must be >= 0 #11
Comments
I will suppose x to be width? have you tried checking what width is returned so compare and see first? |
I make it workaround like this.
|
CropImageTask -> doInBackground -> IOException changed to catch (Exception e) { CropArea -> applyCropTo (Bitmap bitmap) -> changed to public Bitmap applyCropTo (Bitmap bitmap) throws IllegalArgumentException Above can prevent crashes. CropIwaView -> preceded by judgment: crop (CropIwaSaveConfig saveConfig) { |
I've fixed this issue with posting message on UI thread. It seems that this exception is raised when sixe of view is still not set. cropView.post(() ->
cropView.crop(new CropIwaSaveConfig.Builder(croppedFileDestination)
.setCompressFormat(Bitmap.CompressFormat.JPEG)
.setQuality(80)
.build())); |
I have no way to catch this error :(
Can this be solved by catching the
IllegalArgumentException
in theAsyncTask
, return it and call theonError
method?The text was updated successfully, but these errors were encountered: