Quantcast
Channel: magick Discussions Rss Feed
Viewing all articles
Browse latest Browse all 3693

New Post: Converting mask to color

$
0
0
I will add both Alpha and LevelColors. After the next release that I will publish this weekend you will be able to do this:
// Background purple, foreground yellow.using (MagickImage image = new MagickImage("mask.png"))
{
  image.LevelColors(Color.Purple, Color.Yellow);
  image.Write("mask-ithurtsmyeyes.png");
}

// Background transparent, foreground blue.using (MagickImage image = new MagickImage("mask.png"))
{
  image.BackgroundColor = Color.Blue;
  image.Alpha(AlphaOption.Shape);
  image.Write("mask-blue.png");
}

Viewing all articles
Browse latest Browse all 3693

Trending Articles