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?
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.