rmagick: animated gif resize returns corrupted

I

Iseng ---

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top