Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Image manipulation snippet
Index -> Programming, Ruby -> Ruby Submissions
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
wtd




PostPosted: Sun Apr 03, 2005 9:55 pm   Post subject: Image manipulation snippet

We were discussing resizing images (for the Ruby IDE discussion) and I took a look at RMagick. So, a quick look at the code to write an application which resizes a number of images to 400x300 pixels.

code:
#!/usr/bin/ruby

require 'RMagick'

include Magick

ARGV.each do |file_name|
   ImageList.new(file_name).resize(400, 300).write("tn-#{file_name}")
end


More info on RMagick.
Sponsor
Sponsor
Sponsor
sponsor
Display posts from previous:   
   Index -> Programming, Ruby -> Ruby Submissions
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 1 Posts ]
Jump to:   


Style:  
Search: