New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ResizeImage cannot resize gif #90804
Comments
@weiminghuaa |
@darshankawar Yes. I mean, I use the CachedNetworkImage memCacheWidth to reduce the memory usage of very large images. This method is effective for many image formats, such as webp and png, but it is not valid for gif. I see that CachedNetworkImage memCacheWidth is actually call ResizeImage resizeIfNeeded, so I want to ask if the problem lies in ResizeImage |
@weiminghuaa |
@darshankawar I have tested memory only using ReSizeImage with a sample gif. You can test the following code, no matter which way, the memory usage is 36.5M
|
@weiminghuaa Looking at the documentation, it states https://api.flutter.dev/flutter/painting/ResizeImage/resizeIfNeeded.html |
I have try by providing both width and height, it's not work. |
@weiminghuaa |
I use Dart DevTools measure the memory. There is no problem with png or jpeg, but gif. |
Thanks for the update. I see the same behavior on latest stable and master. stable, master flutter doctor -v
|
CachedNetworkImage has memCacheWidth/memCacheHeight to reduce image memory, I think it implement by ResizeImage when look CachedNetworkImage src. But it's not work in gif, how to solve it?
The text was updated successfully, but these errors were encountered: