Creating new Magick::Image from uploaded data

Hi!

Is it possible to create a new instance of Magick::Image out of uploaded
data via file input?

Now i save my file to the disk, then read it to create an instance of
Magick::Image, resize it and save it again.

Am Mittwoch, den 08.03.2006, 18:13 +0100 schrieb szymek:

Hi!

Is it possible to create a new instance of Magick::Image out of uploaded
data via file input?

Now i save my file to the disk, then read it to create an instance of
Magick::Image, resize it and save it again.

Yes. See this example:

def file=(new_file)
new_file.rewind
image = Magick::Image::from_blob(new_file.read).first
end


Norman T.

http://blog.inlet-media.de

Thanks!!!