Problem in cropping Images

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
ratneshsoni
Posts: 38
Joined: 2010-12-14T03:56:10-07:00
Authentication code: 8675308

Problem in cropping Images

Post by ratneshsoni »

hello

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 http://www.labellecarte.com/public/imag ... 229900.png -crop 480x480+0+0 http://www.labellecarte.com/public/imag ... 229900.png
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Problem in cropping Images

Post by fmw42 »

Add +repage after the crop. see http://www.imagemagick.org/Usage/crop/#crop_repage. 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.
Last edited by fmw42 on 2012-03-27T21:09:14-07:00, edited 2 times in total.
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Problem in cropping Images

Post 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.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Problem in cropping Images

Post 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.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply