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. -- Posted via http://www.ruby-forum.com/.
Norman Timmler
2006-Mar-08 18:29 UTC
[Rails] Creating new Magick::Image from uploaded data
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 Timmler http://blog.inlet-media.de