I'm trying to resize a gif file but it get distorted. I know that I have to implement something like the mentioned in bottom links but I don't have a clear idea how to do that with Carrierwave:
http://www.imagemagick.org/Usage/anim_basics/#coalesced
Resize animated GIF file without destroying animation
Here is a script to reproduce the bug:
require 'rubygems'
require 'carrierwave'
class AvatarUploader < CarrierWave::Uploader::Base
storage :file
include CarrierWave::RMagick
version :thumb do
process resize_to_fit: [200, 200]
end
def store_dir
'images'
end
end
uploader = AvatarUploader.new
uploader.download! 'https://dl.dropboxusercontent.com/u/3217866/9706f7e6-4d56-11e3-9551-9da854d79892.gif'
uploader.store!