More a shell question. Your file pattern makes one singe call to compose see all the files. There is a specific syntax in IM to tell it to loop over files but this is complicated and in Linux (if I trust your profile) its a lot simpler to use the regular shell syntax. Try something like:
(one-liner for a command line, or in a script:
In slo-mo:
Code:
for f in *alpha.jpg; do b=$(basename $f _alpha.jpg); composite -compose $b.jpg ${b}_alpha.jpg $b.png;done
(one-liner for a command line, or in a script:
Code:
for f in *alpha.jpg
do
b=$(basename $f _alpha.jpg)
composite -compose $b.jpg ${b}_alpha.jpg $b.png
done
In slo-mo:
- for f in *alpha.jpg: will loop over all the *alpha files. Looping on the others is complicated because the simple pattern frame*.jpg will include both the "plain" files and the "alpha" ones.
- b=$(basename $f _alpha.jpg) extracts the base name of the file, and drops the _alpha.jpg termination if present, so tiu are left with frame_000000xxx.
- composite -compose $b.jpg ${b}_alpha.jpg $b.png calls the command, and $b or ${b} is replaced by the frame_000000xxx obtained above. ${b} is necessary when appending _alpha because with $b_alpha the shell would be looking for a variable named $b_alpha since the underscore can be used in variable names.