As you didn't raise any objection to my suggestion of using ImageMagick, I will show you how to do it using that.
As you didn't provide any images, let's assume you have two directories called A
and B
with PNG files in A
that you want to use as the red channel and PNG
files in B
that you want to use as the blue channel. I'll assume you want a zero/blank green channel.
./A/image1.png
./A/image2.png
./B/image1.png
./B/image2.png
Now, go into A
and the basic command for one file is:
cd A
magick image1.png ( +clone -fx 0 ) ../B/image1.png -combine result.png
That says... "load image1.png
, make a copy of it and fill the copy with zeroes, load ../B/image1.png
and combine them assuming the first is red, the second is green and the third is blue, and save them as result.png
".
Hopefully you can get that working. If it does what you want, we can work on a batch version. I don't use Windows, so I would write this on Linux:
#!/bin/bash
for f in *png ; do
echo "Combining $f (as Red), zero (as Green) and ../B/$f (as Blue) to make res-$f"
magick $f \( +clone -fx 0 \) ../B/$f -combine res-$f
done
I know a dangerously small amount of Windows BATCH script, so I'll do my best to guess how it will look. Save it as GO.BAT
:
FOR %%G IN (*.png) DO (
ECHO %%G
magick %%G ( +clone -fx 0 ) ../B/%%G -combine res-%%G
)
If I load your "image" into Photoshop and cut out the salient parts and trim the 112 pixels off the second image to make it the same size as the first and then reverse the order and combine them using the commands suggested, I get:
