Discussion:
How to crop image toward right by pixels?
Peng Yu
2010-10-06 01:11:03 UTC
Permalink
Hi,


convert.exe tif/tmp_Page_1.tiff -gravity East -crop 70%x100% tmp.tiff

The above command can correctly crop the right 70% of the image. But
the following command always crops toward the left. Is this a bug?

convert.exe tif/tmp_Page_1.tiff -gravity East -crop 3000x3397 tmp.tiff


I have the following ImageMagick version.
$ convert.exe -version
Version: ImageMagick 6.6.1-7 2010-05-07 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2010 ImageMagick Studio LLC
Features: OpenMP
--
Regards,
Peng
Anthony Thyssen
2010-10-06 01:50:25 UTC
Permalink
On Tue, 5 Oct 2010 20:11:03 -0500
magick-users-***@imagemagick.org wrote:
| Hi,
|
|
| convert.exe tif/tmp_Page_1.tiff -gravity East -crop 70%x100% tmp.tiff
|
| The above command can correctly crop the right 70% of the image. But
| the following command always crops toward the left. Is this a bug?
|
| convert.exe tif/tmp_Page_1.tiff -gravity East -crop 3000x3397 tmp.tiff
|

-gravity has no bearing on 'tile cropping' though it effects percentage
crops in a special way.

You MUST add +0+0 to second crop argument. But really you should have
it on BOTH arguments.

Read IM examples, Cutting and Bordering Images
http://www.imagemagick.org/Usage/crop/



Anthony Thyssen ( System Programmer ) <***@griffith.edu.au>
--------------------------------------------------------------------------
... and the smoking yet still impressive hole where the
Alchemist's Guild had been up until yesterday.
-- Terry Pratchett, "Soul Music"
--------------------------------------------------------------------------
Anthony's Castle http://www.cit.griffith.edu.au/~anthony/

Loading...