3

I'm looking for a tool I can use via command line (windows 7) to merge two equally sized pngs. I'm not having much luck with search so far as most tools I've seen are pretty heavy applications which don't seem to target simple manipulations.

I want to overwrite the bits in the opaque base image with the non-transparent pixels in the overlay image. I have photoshop CS4 as well, but haven't had much luck in finding the relevant command line arguments.

Shane
  • 4,921
  • 5
  • 37
  • 53

1 Answers1

9

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

composite foreground.png background.png newimage.png
Adam
  • 35,919
  • 9
  • 100
  • 137
  • Coincidentally (or maybe it's the only one that rises to the top) I was looking at ImageMagick. I'm in the middle separating my layers and getting everything ready for the trial run. +1 for verifying, thanks. – Shane May 15 '12 at 21:24