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

New Post: please help

$
0
0
Your command translates to this:
using (MagickImage image = new MagickImage("test.bmp"))
{
  image.ColorFuzz = new Percentage(20); // -fuzz 20%
  image.Opaque(new MagickColor("#c62122"), MagickColors.Black); // -fill black -opaque "#c62122"
  image.Threshold(new Percentage(1)); // -threshold 1%
  image.Write("convert.bmp");
}
Most of the command line options are methods/properties of the MagickImage class. And below is an example that demonstrates how you can convert a MagickImage to and from a bitmap.
using (Bitmap bitmap = new Bitmap("input.bmp"))
{
  using (MagickImage image = new MagickImage(bitmap))
  {
    return image.ToBitmap();
  }
}

Viewing all articles
Browse latest Browse all 3693

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>