ruby easy convert gif2jpg

Here it is :)
require ‘rubygems’
require ‘RMagick’

include Magick
for arg in ARGV do
im =

im.write(arg.split(‘.’)[0..-2].join(‘.’) + ‘.png’)


One thought on “ruby easy convert gif2jpg

  1. /Users/rogerpack/dev/ruby_186_installed/lib/ruby/gems/1.8/gems/rmagick-2.5.2/lib/RMagick.rb:1578:in `read': unable to open file `/var/folders/+c/+cGckRwyEEOs13-JyrHxSk+++TI/-Tmp-/magick-USNbJFy0′: No such file or directory (Magick::ImageMagickError)

    meant ‘I think you’re trying to convert a non image file’ or something [?]

Leave a Reply

Your email address will not be published. Required fields are marked *

five − = 0

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>