I looked at the properties from file explorer, everything is the same, compression, bit depth...
I'm not sure why
I'm not sure how to debug it. How can I tell the differences?
Compression is CCITT T.4
Resolution is 200dpi
Bit Depth 1
Resolution unit 2
Both the same.
It's sort of strange that I use CompressionScheme = TiffCompression.TiffCompressionCCITT3;
and it comes out T.4 but I guess that's normal.
My code is below from converting a PDF to a Multipage tiff
Code: Select all
foreach (var a in oGdPicturePDF)
{
for (int i = 1; i <= a.GetPageCount(); i++)
{
if (Status == GdPictureStatus.OK)
{
a.SelectPage(i);
int RasterizedPageID = a.RenderPageToGdPictureImageEx(DPI, true);
if (RasterizedPageID == 0)
{
// MessageBox.Show("Error:" + oGdPicturePDF.GetStat().ToString());
return "Failed to Create Page ID: " + i;
}
// CCITT3 & CCITT4 compression support only bitonal (1 bpp) images !!
// oGdPictureImaging.DrawText(RasterizedPageID, lfiles[tpc - 1].FileName + " Page " + i, 50, 50, 20, GdPicture9.FontStyle.FontStyleRegular,
// Color.Black, "Arial", false);
// oGdPictureImaging.ConvertTo1Bpp(RasterizedPageID);
if (firstPageMulti)
{
firstPageMulti = false;
MultiTiffID = RasterizedPageID; // Warning: this image must be released at the end!!!!
if (CompressionScheme == TiffCompression.TiffCompressionCCITT3 | CompressionScheme == TiffCompression.TiffCompressionCCITT4)
{
oGdPictureImaging.ConvertTo1Bpp(RasterizedPageID);
}
Status = oGdPictureImaging.TiffSaveAsMultiPageFile(MultiTiffID, outputPath, CompressionScheme);
}
else
{
if (CompressionScheme == TiffCompression.TiffCompressionCCITT3 | CompressionScheme == TiffCompression.TiffCompressionCCITT4)
{
oGdPictureImaging.ConvertTo1Bpp(RasterizedPageID);
}
Status = oGdPictureImaging.TiffAddToMultiPageFile(MultiTiffID, RasterizedPageID);
oGdPictureImaging.ReleaseGdPictureImage(RasterizedPageID);
}
}
}