Skip to content

Remove extra padding at the end of gif#114

Open
mnutt wants to merge 1 commit intojnordberg:masterfrom
movableink:remove-extra-padding
Open

Remove extra padding at the end of gif#114
mnutt wants to merge 1 commit intojnordberg:masterfrom
movableink:remove-extra-padding

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