Skip to content
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

PlatformException(java.lang.IllegalArgumentException: x + width must be <= bitmap.width() #87

Closed
louisdeveseleer opened this issue Jan 18, 2022 · 1 comment

Comments

@louisdeveseleer
Copy link

This happends only for our Android users and is triggered here in Flutter: channel.dart in NativeChannel.memoryToMemory at line 39 within image_editor

Here is the full message:

PlatformException(java.lang.IllegalArgumentException: x + width must be <= bitmap.width()
	at android.graphics.Bitmap.createBitmap(Bitmap.java:858)
	at p.a.a.c.f.d(ImageHandler.kt:3)
	at p.a.a.c.f.c(ImageHandler.kt:5)
	at p.a.a.a.k(FlutterImageEditorPlugin.kt:3)
	at p.a.a.a.c(FlutterImageEditorPlugin.kt:1)
	at p.a.a.a$b.run(FlutterImageEditorPlugin.kt:18)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
	at java.lang.Thread.run(Thread.java:920)
, , null, null)
@CaiJingLong
Copy link
Member

As in the tip, the x + width of the option set when cropping an image cannot exceed the width of the image
Similarly, y + height cannot exceed the height of the image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants