H
Horacio Sanson
I want to read an image from disk, modify it with rmagick (scale) and display
it in an HTML IMG tag but without saving the modified image to disk.
Is there a way to send the Image object directly to the IMG tag??
Something like:
<%
require "RMagick"
include Magick
img = Image.read("image.jpg").first
## Do stuff to img.... like scale it down....
%>
<img src="<%=img.to_blob%>"></img>
regards,
Horacio
it in an HTML IMG tag but without saving the modified image to disk.
Is there a way to send the Image object directly to the IMG tag??
Something like:
<%
require "RMagick"
include Magick
img = Image.read("image.jpg").first
## Do stuff to img.... like scale it down....
%>
<img src="<%=img.to_blob%>"></img>
regards,
Horacio