paths in composite command

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
samiam00
Posts: 10
Joined: 2016-04-26T20:01:22-07:00
Authentication code: 1151

paths in composite command

Post by samiam00 »

this works: (with both images in one folder)
composite -gravity NorthWest north.png AX.jpg AXx.jpg

this doesn't: (with each image in a separate subfolder)
composite -gravity NorthWest "C:\TIApic\NORTH_compound\north.png" "C:\TIApic\NORTH_compound\AX.jpg" "C:\TIApic\NORTH_compound\AXx.jpg"

Can composite not handle paths, or am I doing something wrong?

Ideally, I would like to handle the underlying image (AX.jpg) as a wildcard, so that each image in that folder gets the overlay of 'north.png' - along the lines of:
composite -gravity NorthWest "C:\TIApic\NORTH_compound\north.png" "C:\TIApic\NORTH_compound\*.jpg" "C:\TIApic\NORTH_compound\*.jpg"

Is that possible?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: paths in composite command

Post by fmw42 »

I would suggest you start using the convert equivalent, which is much more modern and more flexible. See http://www.imagemagick.org/Usage/compose/#compose.

Your convert command does not specify a -compose method. As far as I know, composite should work with full paths. But I always use convert syntax. Composite and convert do not do multiple input and multiple output wildcard * symbols. For that you need to write a loop. You can use mogrify to do multiple image composites. See http://www.imagemagick.org/Usage/basics ... fy_compose.

Please always provide your IM version and platform, since syntax may vary.
Post Reply