I'm creating a Rails app right now that requires me to reverse the frames of a GIF image. I've chosen RMagick to do this, but am having some major issues when doing so. My current function is as so:
def reverse_gif
current_gif = Magick::ImageList.new :gif
new_gif = Magick::ImageList.new
count = 0
current_gif.length.times do
new_gif.read(current_gif[current_gif.length - count])
count++
end
!current_gif
end
I'm honestly just starting out with ruby at the moment but am having severe problems doing this. It seems like I'm making it far too difficult.
I should also mention that I'm using paperclip for image management in my app.
|