Image versioning with FileColumn

hello,

I have recently discovered the file column plugin. so far I have got my
images uploading and displaying just fine. However, I can’t seem to
display two different versions of my image. I have a thumbnail and a
medium size specified in my model.

class Image < ActiveRecord::Base
file_column :image, :magick => {
:versions => { “thumb” => “100x100”, “medium” => “640x480>” }
}
end

from my list action I am calling to a thumbnail view.

<%= image_tag url_for_file_column(image, “image”, “thumb” ), :alt =>
image.comment %>

this seems to give me a nice thumbnail view however the dimensions of
the image are set to 100 x 75. Here is the code that the above tag is
outputting

this is good

in my show action I have the following code outputting the image

<%= image_tag url_for_file_column(image, “image”, “medium” ), :alt =>
image.comment %>

once again the image dimensions are set to 100 x 75. Where is rails
getting this value from? And why does it not differentiate between the
two versions of image I have specified?

thanks in advance for any help.

Stewart

On 27 Aug 2006, at 14:15, Stewart M. wrote:

file_column :image, :magick => {
the image are set to 100 x 75. Here is the code that the above tag is
once again the image dimensions are set to 100 x 75. Where is rails
getting this value from? And why does it not differentiate between
the
two versions of image I have specified?

thanks in advance for any help.

I believe (correct me if I’m wrong) that the 100x100 is the maximum x/
y values and the aspect ratio of the image uploaded is fixed to the
uploaded image. So if you upload an image with a resolution of 200 x
100, the file_column plugin will resize it to 100 x 50. I would check
your original image that you’re uploading.

Alastair


Alastair M.
Standards compliant web development with Ruby On Rails, PHP and ASP
www.kozmo.co.uk
07738 399038

Alastair M. wrote:

On 27 Aug 2006, at 14:15, Stewart M. wrote:

file_column :image, :magick => {
the image are set to 100 x 75. Here is the code that the above tag is
once again the image dimensions are set to 100 x 75. Where is rails
getting this value from? And why does it not differentiate between
the
two versions of image I have specified?

thanks in advance for any help.

I believe (correct me if I’m wrong) that the 100x100 is the maximum x/
y values and the aspect ratio of the image uploaded is fixed to the
uploaded image. So if you upload an image with a resolution of 200 x
100, the file_column plugin will resize it to 100 x 50. I would check
your original image that you’re uploading.

Alastair


Alastair M.
Standards compliant web development with Ruby On Rails, PHP and ASP
www.kozmo.co.uk
07738 399038

thanks so much Alastair,

thats exacley whats happening!