I am new to ImageMagick (been using FreeImage) and I am trying to convert a bunch of grayscale PNG files to black and white (bi-tonal) tiffs. The code I have runs but produces tiffs that I can not open in anything, they are just garbage. Any help would be greatly appreciated. Here is what I got, it is C#:
public void convertPNGtoTiff(string workingFileName)
{
MagickImage PNGimage = new MagickImage(workingFileName);
PNGimage.QuantizeColorSpace = ColorSpace.GRAY;
PNGimage.QuantizeColors = 2;
PNGimage.QuantizeDither = true;
PNGimage.Quantize();
string newfilename = workingFileName.Substring(0, workingFileName.Length - 4) + ".tif";
PNGimage.Write(newfilename);
}