ImageMagick rotate animated gif glitches

不羁的心 提交于 2019-12-13 02:59:55

问题


I'm using ImageMagick to rotate animated gifs. Simply:

convert image.gif -rotate 32 -alpha set -background none output.gif

Output: https://s3-eu-west-1.amazonaws.com/uploads-eu.hipchat.com/108112/892631/ATp8mXXrDdSkCNu/sowa-test2.gif

Does anyone have a clue why output image is distorted this way and how to avoid this?


回答1:


Without seeing the original image, I would suggest extracting each image, apply rotation, and then re-build the animated gif.

Example using the following gif:

convert anim_none.gif -scene 1 +adjoin tmp_%02d.gif
mogrify -rotate 32 -alpha set -background none tmp_*.gif
convert tmp_*.gif -loop 0 final.gif

And note: quality is expected to degrade with rotation operations.



来源:https://stackoverflow.com/questions/28069004/imagemagick-rotate-animated-gif-glitches

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!