From: Thufir Date: 2007-11-29T11:30:27+09:00 Subject: Re: Im trying to make Thumbnail pics -- any suggestions? On Thu, 29 Nov 2007 09:29:25 +0900, Ryan Davis wrote: > require 'rubygems' > require 'image_science' > > Dir["*.jpg"].each do |file| > ImageScience.with_image(file) do |img| > img.thumbnail(200) do |thumb| > thumb.save "#{file.sub(/.jpg$/, '')}_thumb.png" > end > end > end Very cool :) I'm ok with the ruby, but how would you put that *into* a rails project so that the above code is run when the new images are imported to the db? thanks, Thufir