Closed tong-k-k closed 1 year ago
Is there any trick or how to use this plugin properly when dealing with large image?
I think it is too slow, like when just do a rotation, on a large image.
It pause a while, around 3-5 sec, to do a just rotation.
So any tips? below is my code snippet
Future<void> _rotate(RotateOption rotateOpt) async { _handleOption(<Option>[rotateOpt]); } Future<void> _handleOption(List<Option> options) async { for (int i = 0; i < options.length; i++) { final Option o = options[i]; imageEditorOption.addOption(o); } final Uint8List? result = await ImageEditor.editImage( image: editedImageByte!, imageEditorOption: imageEditorOption, ); if (result == null) { _setImageProvider(null); return; } editedImageByte = result; final MemoryImage img = MemoryImage(result); _setImageProvider(img); } void _setImageProvider(ImageProvider? provider) { this.provider = provider; setState(() {}); }
onPressed: () { _rotate(const RotateOption(90)); },
Content
Is there any trick or how to use this plugin properly when dealing with large image?
I think it is too slow, like when just do a rotation, on a large image.
It pause a while, around 3-5 sec, to do a just rotation.
So any tips? below is my code snippet