This project has moved. For the latest updates, please go here.

How to convert TIF to Black-and-White Monochrome TIF

Jun 27, 2016 at 1:49 PM
Edited Jun 27, 2016 at 3:47 PM
Hi!

I would like to use Magick.NET https://magick.codeplex.com/wikipage?title=Convert%20image&referringTitle=Documentation

in order to convert TIF to Black-and-White Monochrome TIF but manual does not explain it well.



MagickReadSettings readSettings = new MagickReadSettings() { UseMonochrome = true };

using (MagickImage image = new MagickImage(fileInfo.FullName, readSettings))
{
    image.CompressionMethod = CompressionMethod.Group4;
   image.Format = MagickFormat.Tif;

   image.Write(newFileName);
}


But sometimes new converted files are BLACK! And the original TIF looks ok absolutely.

Any clue how is possible to fix it, please.


Help needed. Thank you!
Coordinator
Jun 27, 2016 at 6:39 PM
The UseMonochrome option is only support by PCL, PDF, PS and XPS so that option doesn't do anything. I just modified the comment to clarify this. Can you share an input image that becomes completely black? And what are you using to view the image? You can post a link to something like Dropbox to share that image. Might be nice to also share your output tiff file. And can you tell me the version of Magick.NET that you are using?