Limit trim to one direction
Posted: 2008-11-20T10:31:09-07:00
Using the command line, how would I trim (-trim) an image only say in x direction
Thanks a bunch,
Thanks a bunch,
Use https://github.com/ImageMagick/ImageMagick/discussions instead.
https://imagemagick.com/discourse-server/
https://imagemagick.com/discourse-server/viewtopic.php?t=12525
I don't think -trim allows directional control. The only way I can think of doing that is to use -extent to add a few pixels of different color on the two sides you want to preserve, then use -extend to add a few pixels of the same color on the side you want to trim so that the corner pixels are the color you want to trim, but the most of the other two sides are not that color. Then use -trim to remove the color you want on the one side and then follow that with -shave to remove the added other color on the other side.btnadiga wrote:Using the command line, how would I trim (-trim) an image only say in x direction
Thanks a bunch,
btnadiga wrote:The problem is that I have a sequence of images where the object of interest moves. So manual cropping is not viable.
Actually, xv -acrop works great (except that I could not figure out how to make it save the cropped images without using the gui)
So, if one of you can tell me the optional parameters for Imagemagick that will emulate xv -acrop it would be perfect.
Thanks,
Balu