Rmagick: animated gif resize returns corrupted

Hopefully this is the the right place to ask. I’m sorry if not.

I’m trying to create a thumbnail (100x100). It works on most images. But
on some animated gif files it return corrupted thumbnail images.

Here’s my ruby codes

img = ::Magick::ImageList.new(source_path)
img.each { |frame|
frame.change_geometry!(dimension) do |c, r, i|
i.resize!(c, r)
end
}
img.write(result_path)

Animated gif that works:
http://img147.imageshack.us/img147/7841/bugsbunnyzv8.gif

Animated gif that becomes corrupted:
http://img134.imageshack.us/img134/1121/hahasiggy48zycd4.gif

result: http://img346.imageshack.us/img346/9820/hahasiggy48zytnop9.gif

Another gif that becomes corrupted:
http://img209.imageshack.us/img209/442/haruhinf2.gif

result: http://img124.imageshack.us/img124/4289/haruhitnfv7.gif

Can anyone tell me what I did wrong and how to resolve this? Thank you.

I have same problem… Any solutions?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs