flutter_image_editor icon indicating copy to clipboard operation
flutter_image_editor copied to clipboard

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

Open louisdeveseleer opened this issue 3 years ago • 1 comments

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)

louisdeveseleer avatar Jan 18 '22 15:01 louisdeveseleer

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

CaiJingLong avatar Mar 09 '22 07:03 CaiJingLong