jnordberg / gif.js

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

iOS - generated GIFs have transparent backgrounds? #40

Open kyleconrad opened 9 years ago

kyleconrad commented 9 years ago

So I'm using gif.js to write video frames to a canvas element to generate an animated GIF. That's all good on desktop, everything works great, GIF is perfect.

But I'm attempting to roll out a version working on the iPad (with iOS 8), and the bug I'm getting is super weird - essentially, the GIF will have random blocks of transparent background that don't appear on the desktop version. I've set background in my options like so background: 0x000000 but even with that, no good, still transparency. I've even written a solid black background to the canvas element using JS (which is then written over by the video frames), but when rendering, it still shows up as transparent.

Just throwing this out there as it's very peculiar and happens to ever GIF I create on mobile Safari using gif.js.