Cannot replace color
Posted: 2017-03-09T09:42:41-07:00
Hello, I'm trying to replace white color to green using this code:
But it seems that code won't work, it just replaces color to light gray. What I should do?
Code: Select all
private static MagickImage ChangeWhiteColor(MagickImage Image, Color TargetColor)
{
MagickImage NewImage = new MagickImage(Image);
NewImage.Opaque(MagickColor.FromRgb(255, (byte)255, (byte)255),
MagickColor.FromRgb(TargetColor.R,
TargetColor.G,
TargetColor.B));
return NewImage;
}