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