Hello
I need help, I've read lots of threads but I'm not getting it. Maybe someone have some clues.
I want remove from image "A" all colors that dont exist in pallete "P", so the final image "B" will be transparent excluding the colors that exist on pallette P
Can I do this with IM?
Image "A"
Palette "P"
Image "B" (output)
Sorry for my bad english.
Thank you in advance for any help or directions to explore, and Merry Christmas to all
Remove color range, and keep another
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Remove color range, and keep another
If you know or can measure the exact color values you want to remove then you can do it by a series of -fill none -opaque somecolor. These two commands can be chained in the same command. If you want to remove near colors you can add -fuzz before -fill none.
try this for example to remove the dark blue:
convert 35543221.png -channel rgba -alpha set -fuzz 10% -fill none -opaque "#3030CE" 35543221_test.png
see http://www.imagemagick.org/Usage/color_basics/#replace
try this for example to remove the dark blue:
convert 35543221.png -channel rgba -alpha set -fuzz 10% -fill none -opaque "#3030CE" 35543221_test.png
see http://www.imagemagick.org/Usage/color_basics/#replace