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

image/gif: Encode creates corrupt GIF files from SubImages trimmed from the bottom #20692

jeddenlea opened this issue Jun 15, 2017 · 2 comments


Copy link

@jeddenlea jeddenlea commented Jun 15, 2017

If you have an image with bounds (0,0)-(W,H), then create a SubImage with bounds (0, 0)-(W,H-n), and encode that sub image, the result is corrupt. Firefox, Chrome, and Safari will display the GIF just fine, but other more strict parsers, including image/gif's decoder, will see trailing data in the image's LZW stream and fail.

A CL to fix this is on its way...

Copy link

@gopherbot gopherbot commented Jun 15, 2017

CL mentions this issue.


Copy link

@odeke-em odeke-em commented Jun 15, 2017

/cc @nigeltao


@gopherbot gopherbot closed this in c52aca1 Jun 16, 2017
@golang golang locked and limited conversation to collaborators Jun 16, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants