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

Remove extra padding at the end of gif #114

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

Conversation

mnutt
Copy link

@mnutt mnutt commented Jan 29, 2020

gif.js was always allocating a full page at the end of the Uint8Array, which results in extra (empty) space at the end of the resulting gif. It seems to work fine for browsers and most things that display gifs, but causes ffmpeg to error when trying to use a gif as the input.

This change allocates only the space needed for all frames, and slice()s out the final page to the cursor.

gif.js was always allocating a full page at the end of the Uint8Array, which results in extra (empty) space at the end of the resulting gif. It seems to work fine for browsers and most things that display gifs, but causes ffmpeg to error when trying to use a gif as the input.

This change allocates only the space needed for all frames, and slice()s out the final page to the cursor.
@mnutt
Copy link
Author

mnutt commented Feb 4, 2021

@jnordberg is there any interest in this change?

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

Successfully merging this pull request may close these issues.

1 participant