Version 10 vs 9 tiffs are different somehow.
Posted: Wed Apr 30, 2014 7:57 pm
So I have an old outdated 3rd party viewer that needs to view these tiffs I'm creating with GDPicture and for some reason when I changed from Version 9 to 10, this 3rd party view gives an error (The tiff looks fine, there's nothing wrong with it, just a very picky viewer).
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
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);
}
}
}