I have a large number of monochrome PNGs that are black on transparent. I would like to invert them to be white on transparent. I've tried using XnConvert but it doesn't maintain the transparency.
ImageMagick will do it:
for a single image:
convert black.png -negate white.png
for a directory full of images:
mogrify -negate *.png
The "-negate" option only affects the pixel color components and doesn't change the alpha (transparency).
For ImageMagic7 you can disable the negation of the alpha channel like this:
mogrify -alpha deactivate -negate *.png