-
Notifications
You must be signed in to change notification settings - Fork 6
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
Support GIF's with no colormap #10
Labels
Comments
I can modify the loader so it won`t panic on empty palettes, just boldly returning 0 in |
That would also be an option. And you would set if from |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is just a request for a feature you may want to support:
The standard says, that both global and local color tables are no required blocks. In that case the application can use a default colormap.
Currently
gif_load.h
does not parse such images.I have made some changes in my copy to support it:
(1) Continue parsing when
clrs
is 0.(2) Give access to the palette definition in the
GIF_WHDR
structure.(3) Return the value of the GIF header field
color resultion
. As I read it, it can be used in such a case to determine how many colors the palette has in order to supply a suitable replacement.(1) and (2) would be nice to have, (3) could in principle also be done in the application, because the value is at a fixed position in the file.
These are my changes:
In my program I'm doing something like that, when there are no colors:
The text was updated successfully, but these errors were encountered: