You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
I can modify the loader so it won`t panic on empty palettes, just boldly returning 0 in cpal.
The additional field seems superfluous, since the right field to hold the number of colors requested by the GIF is definitely clrs.
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: