-
I have a regular image with multiple colours, what is the most efficient way to replace all these colours to a single colour, e.g. all pixels non-alpha pixels become red. I found Opaque() method but that targets a single colour only. |
Beta Was this translation helpful? Give feedback.
Answered by
dlemstra
Apr 14, 2022
Replies: 1 comment
-
One option could be to use the using var image = new MagickImage("input.png");
image.Fx("a == 0 ? a : red");
image.Write("output.png"); Some documentation about that can be found here: https://imagemagick.org/script/fx.php. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
defunky
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
One option could be to use the
Fx
method:Some documentation about that can be found here: https://imagemagick.org/script/fx.php.