crop_your_image
crop_your_image copied to clipboard
First load is slowly & Loading widget should customizable
I don't know what this function that to do but it need too much time to done.
@override
void didChangeDependencies() {
final future = compute(_fromByteData, widget.image);
_lastComputed = future;
future.then((converted) {
if (_lastComputed == future) {
_targetImage = converted;
_withCircleUi = widget.withCircleUi;
_resetCroppingArea();
setState(() {
_lastComputed = null;
});
widget.onStatusChanged?.call(CropStatus.ready);
}
});
super.didChangeDependencies();
}
And I suggest for you that CircleProgressLoading
should be customizable.
Any update?
@rikai-trongpq Hi, thank you for your feedback.
That function is to read given image data of Uint8List
and convert to Image
object which has width and height of raw image.
I have very few time to maintain this package and no update yet, so I'm appreciate if you send some pull request showing how to solve this issue.
Same problem. Loading the image cost too much time about 2 seconds, this is intolerable in my app. Why ?
@rikai-trongpq
And I suggest for you that CircleProgressLoading should be customizable.
I solved this point with version 0.7.3
. You can check the change in PR https://github.com/chooyan-eng/crop_your_image/pull/75 .
Thanks.
Actually, loading time depends mainly on the computation in crop
package, which calculates the actual size of the images starting with detecting the format of it. It's not the same story with just displaying images with Image.memory()
.
I'm thinking of receiving imageFormat
parameter to Crop
so that image
package can skip detecting iamges' format.
Replace Image.memory
with Image.file
will be faster.
I couldn't find a way to make it faster and I updated and published the old simple_image_crop
with null-safety as simple_image_crop_plus
It's fast, and successful with circle UI.