Posts

Showing posts from July, 2012

Converting One Image Format to Another using Ruby

Insert the following code in your Ruby file.
require 'rubygems' require 'RMagick' img = Magick::Image.read("image.png").first img.write("image.jpg") # Writes a JPEG img.write("image.gif") # Writes a GIF img.write("JPG:image") # Writes a JPEG img.write("JPG:image.gif") # Writes a JPEG