Method: DynamicImage::ImageProcessor#read
- Defined in:
- lib/dynamic_image/image_processor.rb
#read ⇒ Object
Returns the image data as a binary string.
51 52 53 54 55 56 57 58 59 60 |
# File 'lib/dynamic_image/image_processor.rb', line 51 def read tempfile = Tempfile.new(["dynamic_image", target_format.extension], binmode: true) tempfile.close write(tempfile.path) tempfile.open tempfile.read ensure tempfile.close end |