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
OOM loading huge gifs #83
Comments
Doing so means we go from using 3x the necessary memory in the worst case to 2x, and in the best case we go from using 2x the necessary memory to using exactly what we need (for images larger than the buffer size). Progress toward bumptech#83
I have changed the source code follow sjudd@b504aa2 ,does not work. and my gif url is http://wankr-doubi.oss-cn-qingdao.aliyuncs.com/8ab85cde-b3e0-4a44-aacf-73f293f4b99f.gif I test it on another device, with no problem. |
Power of 2 downsampling was added here: 8be38e5. We still don't downsample all temporary data, so there's more work to do here. Specifically we need to find a way to downsample the byte array that is used to store pointers into the color table during the decode process for each frame. |
A 3840x2880 example is http://media4.giphy.com/media/ToMjGpquWkOQon5nAvS/giphy.gif.
Probably the most reasonable thing is to catch the exception, allow the load to fail, and encourage users to not try to load gigantic gifs, but we may also be able to find some reasonable way of downsampling GIFs the same way we do Bitmaps.
The text was updated successfully, but these errors were encountered: