Open liyingping opened 3 years ago
final ImageEditorOption option = ImageEditorOption(); ColorOption coloroption = ColorOption.brightness(action.payload); option.addOption(coloroption); Uint8List result = await ImageEditor.editFileImage( file: File(mBean.path), imageEditorOption: option, );
Then load new Image:
ExtendedImage.memory(result , fit: BoxFit.contain, mode: ExtendedImageMode.editor, extendedImageEditorKey: editorKey, initEditorConfigHandler: (mstate) { return EditorConfig( maxScale: 8.0, cropRectPadding: EdgeInsets.all(20.0), hitTestSize: 20.0, cropAspectRatio: CropAspectRatios.ratio4_3); })
The new picture is white
So, what do you want to do?
final ImageEditorOption option = ImageEditorOption(); ColorOption coloroption = ColorOption.brightness(action.payload); option.addOption(coloroption); Uint8List result = await ImageEditor.editFileImage( file: File(mBean.path), imageEditorOption: option, );
Then load new Image:
ExtendedImage.memory(result , fit: BoxFit.contain, mode: ExtendedImageMode.editor, extendedImageEditorKey: editorKey, initEditorConfigHandler: (mstate) { return EditorConfig( maxScale: 8.0, cropRectPadding: EdgeInsets.all(20.0), hitTestSize: 20.0, cropAspectRatio: CropAspectRatios.ratio4_3); })
The new picture is white