When I convert the attached documents to TIFF G3 using the code below, there appears to be no shading in the conversion to monochrome. Is there an option that can be used to enable some sort of dithering or other shading technique?
If I instead convert the document to a TIFF LZW and then load and convert the document to G3 using our internal image optimization or via the Victor library, the results are very different and more consistent with what our QA department is expecting. I’ve attached the source documents, and output for each using both techniques.
Code:
var config = new ConversionConfig();
var conversionHandler = new ConversionHandler(config);
var imageSaveOptions = new ImageSaveOptions
{
ConvertFileType = ImageSaveOptions.ImageFileType.Tiff,
Grayscale = true,
TiffOptions =
{
Compression = TiffOptions.TiffCompression.Ccitt3
},
HorizontalResolution = 203,
VerticalResolution = 192,
};
using (var source = File.OpenRead(parameters.Source.File))
{
using (var destination = File.OpenWrite(parameters.Target.File))
{
using (var result = conversionHandler.Convert(source, imageSaveOptions))
{
result.Save(destination);
}
}
}`
To get the shaded results, I’m changing this line:
Compression = TiffOptions.TiffCompression.Ccitt3
to this line:
Compression = TiffOptions.TiffCompression.Lzw
and then converting the result to monchrome/G3 using another technique.
Again, hoping you have options to enable shading or other ideas.
Aspose Monochrome Quality.zip (210.4 KB)
Thanks
-Jonathan