I believe it can using Rmagick. If you read the rdoc documentation for
file_column you can interact with Magick directly. I don’t have it in
front of me right now so I can’t be more help :(.
A good, integrated and well-documented image manipulation library
is one of a few things I miss from my PHP days.
I see that the SVN version of the excellent file_column plug-in can
create
thumbnails using the url_for_image_column helper.
This uses Rmagick to create the thumbnail… Quick question…
Let’s say the file is a TIFF image - can the helper create a JPG version
of
the thumbnail for display in the browser?
Curious if the plug-in can handle that transform with some creative use
of
the options. Any ideas before I hack up the plug-in code myself?
Yes, you can do that. Actually, you shouldn’t have to do much hacking –
RMagick (or rather, ImageMagick/GraphicsMagick behind it) can determine
what kind of image you feed it.
Here’s the code I use to convert an uploaded photo to a thumbnail that’s
96 pixels in its longest dimension: