Skip to content
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

Can I decode row by row to downscaling images and save memory for big image. #6

Closed
jannson opened this issue May 25, 2024 · 1 comment

Comments

@jannson
Copy link

jannson commented May 25, 2024

Something like this issue: https://stackoverflow.com/questions/28154758/downscaling-images-when-decoding-with-libpng

I want to scale big gif image and save memory, is there a method to decode gif row by row, not reading the whole image to memory.

@jannson jannson changed the title Can I decode row by row to downscaling Images and save memory for big image. Can I decode row by row to downscaling images and save memory for big image. May 25, 2024
@bitbank2
Copy link
Owner

This library was designed for speed first, not to save memory. It uses the current frame as the dictionary, so you need to have a buffer of frame size (1 byte per pixel). It is possible to use my other GIF library (AnimatedGIF) and only keep the dictionary (24K) + 1 line of image. This can produce correct output if you don't have certain restore or palette operations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants