Page 2 of 2

Re: Support required: Cropping Operation

Posted: 2008-07-25T05:16:05-07:00
by jasonhoward
Thanks to both of you. I agree, it is a shame - so i am, right in this moment, updating the packages on the server. In a few minutes i will be able to use the newest available version of imagemagick (according to emerge, this is version 6.4.0.6).

I will post back with my results.

Re: Support required: Cropping Operation

Posted: 2008-07-25T05:29:42-07:00
by Bonzo
Its funny I have had somebody else today talking to me about a similar problem with ^ but he has an up to date version so it should have worked. The problem may be that he is using IM with php on a windows PC . At least with php you can write another piece of code checking the image size and so putting the variables into the IM command quite easily.

Re: Support required: Cropping Operation

Posted: 2008-07-25T09:10:04-07:00
by jasonhoward
Okay guys. Final call!

My own uncautious behaviour led me to update IM on the webserver, while the whole tool was being developed on my local machine. I do not know why the dumbness caught my mind, but yeah - i sat there for 30 minutes emerging the new imagemagick version plus dependencies on the server, then finally realizing: OH BOY, THIS TOOL DOES NOT EVEN USE THE WEBSERVER !!

After forgiving myself, i started to realize that in fact i was using a different IM version than the one i stated in the post. I updated it. Indeed, the local machine is a windows machine, so IM is the windows variant and the ^ operator just does not work. I tried and tried.

Finally, after sitting down with a fresh brainsen, i caught the idea of the whole thing and finally found my solution, trying out with -resize x236 and -resize 236x - chosen according to if the target is landscape or portrait. Finally the script works fine and i feel released.

Thank you for your precious help!

Cheers.

Re: Support required: Cropping Operation

Posted: 2008-07-25T10:29:45-07:00
by fmw42
Note that on Windows ^ is the escape character. Thus to use -resize with ^ your need ^^, eg

convert image -resize 236x236^^ output

see http://www.imagemagick.org/Usage/api/#windows for other Windows specific issues.