Getting image dimensions with file_column

If I'm using file_column and RMagick to upload images and associate them with my database records, what should I do to find out the exact dimensions of a given image?

I can use the url_for_file_column command to link to them, but I'm not sure how to find out the image's height and width in my program.

I don't remember where I got it, but this works for jpegs... used like:

jpeg ="some.jpeg") puts jpeg.width puts jpeg.height

Thanks. I'm pretty certain RMagick actually has that stuff built into it, I'm just not sure how to access it from inside my Rails application.

Me too, but the less I can use imagemagick the happier I am :slight_smile: I was really close to copying the source from php's getimagesize function which can do gif, png, and bitmap as well, but found this which was enough for me...