I've been trying to figure out a way to take a portion of one image and composite it on another with out running a separate convert -crop command, but I'm not having any luck.
So for instance, I'm trying to composite a portion, 1920x50px portion of one image onto a full 1920x1080px image.
Ideas? Any help would be appreciated.
Phil
composite from portion of another image.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: composite from portion of another image.
see parenthesis processing and clones at http://www.imagemagick.org/Usage/basics/#parenthesis
something like:
convert image1 \( image2 -crop ... +repage \) -geometry +X+Y -compose ... -composite result
see also http://www.imagemagick.org/Usage/crop/#crop_repage
something like:
convert image1 \( image2 -crop ... +repage \) -geometry +X+Y -compose ... -composite result
see also http://www.imagemagick.org/Usage/crop/#crop_repage
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: composite from portion of another image.
Or using image layers, just replace the crop position with the position you want!fmw42 wrote:see parenthesis processing and clones at http://www.imagemagick.org/Usage/basics/#parenthesisCode: Select all
convert image1 \( image2 -crop ... +repage \) -geometry +X+Y -compose ... -composite result
Code: Select all
convert image1 \( image2 -crop ... -set page +X+Y \) -flatten result
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/