attachment_fu -- specify exact resize value

How can you get the images and thumbnails to resize to an exact
demension? This is what I have in my model:

:resize_to => '150x150>',
:thumbnails => { :thumb => '31x31>' }

If the images are not perfectly squared, I get sizes like 31x23 or
112x150. I guess I would need the image to be cropped to become
exactly 31x31. Any suggestions?

Thanks in advance!

You can remove the ">" at the end there or use an array [31, 31]
instead and it will squish the image to the size you want.

Cropping is not yet supported in the stable release of
attachment_fu... but if you are willing to do some editing in
attachment_fu .rb files here is a link so someone who claims they
found a solution:

http://www.deepcalm.com/writing/cropped-thumbnails-in-attachment_fu-using-imagescience

Also here is something I found through a quick Google but I'm not sure
if it's any good either:

http://jon-dahl.blogspot.com/2007/03/cropping-with-attachmentfu-ruby-on_6063.html

Cheers.

Perfect, thanks!