8

Using ImageMagick, I want to find any pixels that are white and make them transparent. I'm thinking the key is -threshold but I can't work out how to change a white pixel to transparent using -threshold. Any suggestions most appreciated.

Ciro Santilli OurBigBook.com
  • 347,512
  • 102
  • 1,199
  • 985
ImageQ
  • 81
  • 1
  • 3

2 Answers2

15
convert input.png -fuzz 10% -transparent white output.png

Note that the order of the arguments is important - -fuzz must come before -transparent.

Brad
  • 937
  • 1
  • 9
  • 23
4

Would something like this work?

convert input.jpg -fuzz 5% -fill to_color -opaque from_color output.jpg
Mech
  • 2,904
  • 3
  • 24
  • 29