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.
Asked
Active
Viewed 4,282 times
8
-
Without threshold: http://stackoverflow.com/questions/9155377/set-transparent-background-using-imagemagick-and-commandline-prompt – Ciro Santilli OurBigBook.com Jan 21 '17 at 00:15
2 Answers
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