require 'RMagick'
include Magick
# アニメーションGIFの各フレームを連続した画像に変換する
images1 = ImageList.new("sample62.gif")
images1.size.times { |fn|
images1[fn] = images1[fn].resize(40,40).border(1,2,"#c0c0c0")
}
img = images1.append(false)
img.write("sample780a.png")
exit
元画像(sample62.gif)

出力画像(sample780a.png)

動作環境
ruby1.8.6, rmagick2.7.1
関連項目
ImageMagickで、アニメーションGIFの各フレームを連続した画像に変換する (convertコマンドでの同様の処理)
No comments:
Post a Comment