godaangel / flutter_crop_box

flutter端的素材裁剪组件,不进行实际裁剪,只给出裁剪范围
MIT License
16 stars 3 forks source link

裁剪报错: x + width must be <= bitmap.width() #8

Open feimenggo opened 3 years ago

feimenggo commented 3 years ago

使用这张图片进行裁剪会报错,PlatformException(java.lang.IllegalArgumentException: x + width must be <= bitmap.width() 图片: crop 错误:

E/flutter (27931): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: PlatformException(java.lang.IllegalArgumentException: x + width must be <= bitmap.width()
E/flutter (27931):  at android.graphics.Bitmap.createBitmap(Bitmap.java:876)
E/flutter (27931):  at top.kikt.flutter_image_editor.core.ImageHandler.handleClip(ImageHandler.kt:108)
E/flutter (27931):  at top.kikt.flutter_image_editor.core.ImageHandler.handle(ImageHandler.kt:26)
E/flutter (27931):  at top.kikt.flutter_image_editor.FlutterImageEditorPlugin.handle(FlutterImageEditorPlugin.kt:209)
E/flutter (27931):  at top.kikt.flutter_image_editor.FlutterImageEditorPlugin.access$handle(FlutterImageEditorPlugin.kt:25)
E/flutter (27931):  at top.kikt.flutter_image_editor.FlutterImageEditorPlugin$onMethodCall$$inlined$runOnBackground$1.run(FlutterImageEditorPlugin.kt:221)
E/flutter (27931):  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
E/flutter (27931):  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
E/flutter (27931):  at java.lang.Thread.run(Thread.java:923)
E/flutter (27931): , , null, null)
E/flutter (27931): #0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:607:7)
E/flutter (27931): #1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:156:18)
E/flutter (27931): <asynchronous suspension>
E/flutter (27931): #2      NativeChannel.memoryToMemory (package:image_editor/src/channel.dart:39:20)
E/flutter (27931): <asynchronous suspension>
E/flutter (27931): #3      ImageEditor.editImage (package:image_editor/src/editor.dart:28:13)
E/flutter (27931): <asynchronous suspension>
E/flutter (27931): #4      ImageCrop.getResult (package:crop_box/src/image_crop.dart:34:20)
E/flutter (27931): <asynchronous suspension>
E/flutter (27931): #5      _CropIndexState.build.<anonymous closure> (package:example/crop_index.dart:218:51)
E/flutter (27931): <asynchronous suspension>
E/flutter (27931): 
godaangel commented 3 years ago

我看看

feimenggo commented 3 years ago

我看看

请问这个问题解决了吗?