Merge two pngs using the command line tool on Windows?

I am looking for a tool that I can use through the command line (Windows 7) to combine two identical png sizes. I was not very lucky with the search, since most of the tools I've seen are rather heavy applications that don't seem to focus on simple manipulations.

I want to overwrite the bits in the opaque base image with opaque pixels in the overlay image. I also have Photoshop CS4, but I was not very lucky in finding the appropriate command line arguments.

+3
source share
1 answer

ImageMagick has a command line tool called composite that will do what you want. Distributions are available for Windows, Mac, Linux, etc. I just checked it with two transparent PNGs and it works as expected.

composite foreground.png background.png newimage.png
+6
source

All Articles