Page 1 of 1

Problem in cropping Images

Posted: 2012-03-27T06:35:17-07:00
by ratneshsoni

i am using following command to crop image. But it is not working please let me know the solution of this. previously it is working fine on linux server but as i change it to window server it is not working. Please Help me.

convert ... 229900.png -crop 480x480+0+0 ... 229900.png

Re: Problem in cropping Images

Posted: 2012-03-27T10:07:38-07:00
by fmw42
Add +repage after the crop. see However, I have never tried doing any processing with web files. I don't know if IM can write them back or not. You would certainly need write access, which usually means providing a password and using ftp: rather than http:

Does your cropping work with a file on the system? I would check that first.

Re: Problem in cropping Images

Posted: 2012-03-27T11:39:16-07:00
by Bonzo
I assumed the save to location was a mistake as I do not think you can write back to the server either.

Again more info required - as fmw42 says are they the same versions - how are you running the code - what errors or what is not working - does any imagemagick function work or is it just -crop.

Re: Problem in cropping Images

Posted: 2012-03-27T20:26:08-07:00
by anthony
You can not write to a Web server.

Unless you are actually using "put" to send the image as part of a input form, and that requires interaction using extra form data, with the server you are 'uploading' to. In otherwords a lot more information is needed for the specific upload.

In a PHP program you generally write the image to Standard Output for the 'client' browser to display the image requested.
In this case you generally at least two calls to PHP/CGI applications, one to generate HTML and in the HTML a <IMG> tag to request the image to display from either the same or another PHP/CGI application.