> in a controller i want to render an image.
> i do it like it:
> send_data(Magick::Image.read(http://s3.amazonaws.com/a_bucketname/
> a_filename).first.to_blob, :type => "image/png", :disposition =>
> "inline")


Not sure this is what you want, but you could do it this way:

1. Register :png as a mime type:
    Merb.add_mime_type(:png,  :to_png,  %w[image/png])

2. Define to_png on your model to do the call to ImageMagick

3. Use display @model in your controller

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"merb" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/merb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to