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

Initial commit of stand-alone animated gif library stb_gif.h #1025

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Lokno
Copy link

@Lokno Lokno commented Sep 5, 2020

As requested by STB (https://twitter.com/nothings/status/1298821179206115328) I have refactored the animated GIF code out of stb_image.h and into its own library, called stb_gif.h

The code is basically the same, with changes to the API to make it more directly interact with the animated GIF loading code.
stbgif_load() loads a GIF with all of its layers
compare to stbi_load() in stb_image.h that loads a single layer.
The functionality of stbi_load() on a GIF format image exists in this file as stbgif__load_first_layer()

stbgif_info() determines the x and y dimensions of the GIF, and the number of components (3-4). This mirrors the functionality of stbi_info() in stb_image.h
Adding a feature to read the comment extension to determine the number of layers is left as future work.

@nothings
Copy link
Owner

nothings commented Sep 5, 2020

There's also this attempt that I was also informed of today, I will have to compare them. dc1248@c372da3

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

Successfully merging this pull request may close these issues.

2 participants