Support required: Cropping Operation

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
jasonhoward

Re: Support required: Cropping Operation

Post 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.
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Support required: Cropping Operation

Post 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.
jasonhoward

Re: Support required: Cropping Operation

Post 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.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Support required: Cropping Operation

Post 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.
Post Reply