actually what is done is :
s3 picture is downloaded, then rmagick convert it to data, then i
render it

i was mondering if it was possible to render s3 picture directly and
in a transparent way.

(anyway thank you Mickael your way is more elegant thant mine)

On 12 déc, 22:45, "Michael D. Ivey" <[email protected]> wrote:
> > 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