jnordberg / gif.js

JavaScript GIF encoding library
http://jnordberg.github.io/gif.js/
MIT License
4.76k stars 668 forks source link

Corrects rendering of png's with colors having alpha values #46

Closed anuragagarwal561994 closed 4 years ago

anuragagarwal561994 commented 9 years ago

When a gif is rendered with png images having some alpha values, these colors will get mixed with the black background giving unusual output. As it is shown in #45, the gif won't render perfectly.

The solution to this would be to use a {copy: true} option on png images with a background color of white. for the gif. But this won't work as well because in the getImageData function setFill property of canvas is used which doesn't set the desired fill color instead fillStyle property should be used.

jnordberg commented 8 years ago

Thanks, can you rebase this without the build?

anuragagarwal561994 commented 4 years ago

@jnordberg rebased.

jnordberg commented 4 years ago

Thanks!