Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
image/gif: Decode ingests all frames into memory despite only returning the first one #22199
Please answer these questions before submitting your issue. Thanks!
What did you do?
What did you expect to see?
Decent memory usage, since gif.Decode is documented to only return image for the first frame:
What did you see instead?
High memory usage because
I have a straightforward optimization for this by making
Memory usage reported with the modifications applied is close to what I'd expect to see for a single image: