0

I have a PNG image. I want to use GraphicsMagick to convert all pixels with RGBA=(0, 0, 0, 0) (transparent over black) to be RGBA=(255, 255, 255, 0) (transparent over white). Is it possible to do this in GraphicsMagick?

my current command is:

gm convert orig.png -fill "#FFFFFF00" -opaque "#00000000" result.png

however, this doesn't work because for some reason the alpha channel on the replacement gets set to 100%. So, the actual fill ends up being #FFFFFFFF. Am I missing something?

vasek1
  • 13,541
  • 11
  • 32
  • 36

1 Answers1

1

this worked:

gm convert orig.png -fill "rgba(255, 255, 255, 0.0)" -opaque "#00000000" result.png

looks like the "#FFFFFF00" is properly recognized by the opaque param but not by the fill param

vasek1
  • 13,541
  • 11
  • 32
  • 36