[I may have posted this in the wrong section before, sorry]
Hi all,
I have an image 312x480. I want to remove 40x312 that are located 191px from the top of the image (i.e. 40px from the mid section) and end up with a 312x440 picture, with the middle 40x removed.
Can anyone tell me the imagemagick command to do this?
I'm guessing it's a combination of crop and montage but I'm not sure.
Crop and Concatenate
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Crop and Concatenate
The operator you want in chop. Does exactly what you are wanting.
convert input -chop 0x40+0+191 result
Chops out a row of pixels 40 pixels high starting at pixel 191 from the top. No column is chopped as it is 'zero' pixels.
See http://www.imagemagick.org/Usage/crop/#chop
If you want to insert a blank patch of 40 pixels append a -splice with the same arguments. The -background color is used for the added pixels.
convert input -chop 0x40+0+191 result
Chops out a row of pixels 40 pixels high starting at pixel 191 from the top. No column is chopped as it is 'zero' pixels.
See http://www.imagemagick.org/Usage/crop/#chop
If you want to insert a blank patch of 40 pixels append a -splice with the same arguments. The -background color is used for the added pixels.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/