Hi all, new here, and I was wondering if you could help me out with a problem:
I want to take an image that I have and replace the alphas of the pixels that match a certain color, with a certain fuzz, with the value 0. That is, make all pixels that don't match a certain color clear using Magick++.
Right now, I have this command in a bash script:
\( $PICTURE +fuzz -fuzz $REDFUZZ -fill none +opaque red \) \
\( $PICTURE +fuzz -fuzz $GREENFUZZ -fill none +opaque green \) \
-composite -compose plus \
which allows me to take a picture and replace all the pixels that are not red or green, as individual commands, with clear alphas and then mash those two pictures on top of each other.
I want to do this programatically. Any ideas?
Magick++ is an object-oriented C++ interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning Magick++.
2 posts • Page 1 of 1
- Posts: 23050
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
I know nothing about Magick++ or any other API, but have you looked at colorFuzz and opaque at https://www.imagemagick.org/Magick++/Im ... %20Methods