Create animated gif from images in DB ...

Hi all anyone got an idea of how to create an animated gif using
images uploaded in paperclip?

OR

some way to display rotating images in rails.

(i'm trying to create rotating sponsor images on the fly from user
uploads)

Thanks,

Shawn

slindsey3000 wrote:

Hi all anyone got an idea of how to create an animated gif using
images uploaded in paperclip?

OR

some way to display rotating images in rails.

(i'm trying to create rotating sponsor images on the fly from user
uploads)

You don't need to make animated GIFs for that. All you need is
JavaScript.

Here's a fine example of rotating images with a nice cross-desolve
effect. No animated GIFs and no Flash necessary:
http://www.apple.com/ipad/

If you want to go onto the animated gif direction, i believe the only option you have is to look at ImageMagick and RMagick, but this is not trivial stuff.

On the other side, Javascript and modern browsers (like Safari and FireFox) can help you with something like :

a=0;
setInterval(function(){
  a++;
  var d=document.getElementById('YourImageId');
  d.style['-webkit-transform']='rotate('+a+'deg)'
  d.style['-moz-transform']='rotate('+a+'deg)'
},15)

Hope this helps,

Christophe