Hello
How do I invert the alpha channel in a PNG?
Tnx a lot!
I’d say :
$ gmic input.png to_rgba s c,-3 negate. 255 a c output output.png
EDIT: Well, this one is shorter (but probably a bit slower):
$ gmic input.png to_rgba f. "[R,G,B,255-A]" output output.png
This one is even shorter (and faster) :
$ gmic input.png to_rgba sh 3 negate. rm. output output.png
Plenty of possibilities
I would go with this:
$ input.png to_rgba sh 3 negate. 255 rm. output output.png