jnordberg / gif.js

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

Decimal width/height causes distorted output with images and canvas #34

Open esprehn opened 10 years ago

esprehn commented 10 years ago

ex.

If you specify {width: 213.5, height: 160}

and then do addFrame(image) or addFrame(canvas) the output be skewed and duplicated. If you specify 213 or 214 then it'll be fine.

I was getting this since I was rendering videos so I was specifying video.videoWidth / scaleFactor to downsize the video and it was making distorted gifs (the output looks skewed and you get the far right section of the picture on the far left).