I am using rmagick to convert files stored as a tiff to either pdf or
jpg for display to the user. A snippet of test code from the controller
follows. It works OK. ( it does need a sanitizer )
@sdoc = Sdoc.find(params[:id])
@fname = ‘/var/www/images/’ + @sdoc.fname
@nf = Magick::ImageList.new(@fname)
What I would like to do is avoid having to save the temporary file but I
cant see how to get RMagick to do the actual conversion from tiff to pdf
without writing to a temporary file as I have done above.
I have tried a few experiments with send_data but I think the image
objects are in image magicks internal format.
I am also not clear on if I could get send_data to process a series of
jpegs stored in an rmagick imagelist.