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
The EncodeAll function returns errors when image blocks are too large, on a zero-length gif, etc. As such, in this case since we know the gif can't be encoded due to the palette length being > 256, I would expect a similar error, along the lines of errors.New("gif: image palette is too large to encode") to match the style here
What version of Go are you using (
go version
)?1.8.1
What operating system and processor architecture are you using (
go env
)?darwin / amd64
What did you do?
Created a gif image with a palette ( either global or local color table for a frame ) containing > 256 colors.
https://play.golang.org/p/xfDZCcSIFF
What did you expect to see?
The
EncodeAll
function returns errors when image blocks are too large, on a zero-length gif, etc. As such, in this case since we know the gif can't be encoded due to the palette length being > 256, I would expect a similar error, along the lines oferrors.New("gif: image palette is too large to encode")
to match the style hereWhat did you see instead?
It panics here trying to read
log2Lookup[-1]
defined hereI have a change-set ready with the proposed functionality and accompanying tests.
The text was updated successfully, but these errors were encountered: