Rotate GIF images in java

2019-04-16 21:53发布

I am trying to rotate a GIF image in java.
I read these interresting two trails about rotating images in java : trail 1 , trail 2.

All works fine, except that when I rotate my GIF image, there is no more animation of the GIF image. Only the first image of the GIF animation is displayed.

So, is there any way to keep the GIF animation after rotating my GIF image, without using any third part library but only standard J2SE? Or will I be obliged to separate my GIF image into single images, rotate them one by one, and then display them in a loop?

I don't give any piece of code I wrote because it is not relevant in my humble opinion.

1条回答
虎瘦雄心在
2楼-- · 2019-04-16 22:19

I think animated gifs work by storing multiple frames, all in the gif format. So you just need to apply you rotation method to every single image, instead of the whole gif.

Wikipedia has a quite nice description of the format

查看更多
登录 后发表回答