File_upload - invalid geometry

Hi

I want to use file_column to upload and crop some images. I can get it
uploading absolutely fine but whenever I try and crop and image I
recieve the error:

invalid geometry string `’

Can someone please show me an example of how to do this, I want to
create three files

  1. thumb - 110x85
  2. medium - 180xscaled height
  3. large - 560x300

All of these need to keep there proportions e.g cropped and resized not
just resized.

Any help much appreciated

Jono

Hi Jono,

I’m also learning to use file_column and found this page talking about
geometry string. FYI.

http://www.imagemagick.org/RMagick/doc/imusage.html#geometry

Hope it helps.

Thanks,

walls

This message means that whatever you passed to Rmagick isn’t the correct
syntax.

Since you didn’t post your code, hard to point out where you went wrong
but
I recommend you look at any Rmagick example - the syntax for geometry is
the
same.

I.e.

file_column :photo, :magick => {:versions => { “thumb” => “110x85”,
“medium”
=> “200x”, “large” => “500x300”}}

Hi

This has been driving me crazy have tried everything, can anyone please
shed some light?

Hi Thanks for your replies.

The code I have tried is:

upload

file_column :image_1, :magick => { :versions => {
:thumb => {:crop => “1:1”, :size => “110x85”},
:medium => {:crop => “1:1”, :size => “255x165”},
:large => {:crop => “1:1”, :size => “560x300”}
}
}

Its still erroring. I want it to resize and crop so the proportions are
kept.

Any help much appreciated.