Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Create A New Instance Of Magick::Image Out Of Uploaded Form Data

DZone's Guide to

Create A New Instance Of Magick::Image Out Of Uploaded Form Data

·
Free Resource
Taken from Norman Timmler's example on the Ruby on Rails mailing list:


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

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}