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

New Post: Converting(any?) image to black and white

$
0
0
The .Strip command does not influence the value of a pixel. It removes metadata from an image file (http://www.imagemagick.org/script/command-line-options.php#strip).

You should be able to do the following (this is the equivalent of convert.exe photo_zps3b2313f9.jpg -threshold 25% blackwhite.jpg):
using (MagickImage image = new MagickImage(@"photo_zps3b2313f9.jpg"))
{
  image.Threshold(0.25);
  image.Write("blackwhite.jpg");
}
But this does not seem to work and creates a completely white image. I will have to investigate this for you to figure out what is happening.

If you are looking for documentation about what actual function calls do I would advise you to visit: http://www.imagemagick.org/Usage/ or check the command line options on this page: http://www.imagemagick.org/script/command-line-options.php. The names of the command line options are almost the same as the methods in the MagickImage class.

Viewing all articles
Browse latest Browse all 3693

Latest Images

Trending Articles



Latest Images

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