-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
how to solve the problem of OOM,caused by supersized Gif . #124
Comments
There are several solutions:
Unfortunately currently there is no feature like inSampleSize and all pixels of the GIF need to be loaded into memory. |
thanks for your detailed reply,I consider SampleSize is a better method to avoid OOM,As well as SampleSize works great when decoding in my app.Is there have a good way to implement samplesize? |
Subsampling is basically skipping each
To implement subsampling you have to modify flow of GifInfo#rasterBits |
@guqun you can try GifTextureView. Bitmap is not needed there. Available on API 14+. |
thank you very much! Although there are differences with ImageView, the GifTextureView is a effective way to avoid OOM. I will consider how to behave in the form of GifTextureView and ImageView is consistent. |
@guqun Did you find any solution for supporting resize Gif image yet? I'm facing this problem, too. |
Info for anyone interested in subsampling option: this feature is now available, more info in: https://github.com/koral--/android-gif-drawable/issues/239 |
Thank you very much to maintain the valuable code,I wonder how to solve the problem of OOM,caused by supersized Gif .example,4096 * 4096
The text was updated successfully, but these errors were encountered: