I have a problem with the fact that the Bitmap class in C # does not load TIFT CCITT T.6 files correctly, it will flip it so that the height is width and the width is height.
Has anyone done this before and knows the correct method to handle them?
Edit:
Here is the code:
Bitmap B = new Bitmap(@"C:\test2.tif");
Debug.WriteLine(B.Width);
Debug.WriteLine(B.Height);
When I show it in the .net window (the SizeMode parameter is set to Normal), it also does not display correctly (stretched). But if I open it using the Windows Photo Viewer, it will display correctly.
These are the tags available in the tiff file:
SubFileType (1 Long): Page
ImageWidth (1 Long): 1728
ImageLength (1 Long): 1127
BitsPerSample (1 Short): 1
Compression (1 Short): Group 4 Fax (aka CCITT FAX4)
Photometric (1 Short): MinIsWhite
FillOrder (1 Short): Lsb2Msb
StripOffsets (1 Long): 8
SamplesPerPixel (1 Short): 1
RowsPerStrip (1 Long): 1127
StripByteCounts (1 Long): 14764
XResolution (1 Rational): 204
YResolution (1 Rational): 98
Group3Options (1 Long): 5
ResolutionUnit (1 Short): Inch
PageNumber (2 Short): 0, 0
Software (32 ASCII): Windows NT Fax Server
CleanFaxData (1 Short): 0
ConsecutiveBadFaxLines (1 Short): 0
37680 (5632 Undefined):
40003 (26 ASCII): U.S. Robotics 56K FAX EXT
40005 (1 ASCII):
40046 (1 Long): 1
40047 (1 Long): 4
40048 (1 Long): 256
40049 (1 Long): 18
40051 (1 SRational):
40052 (1 SRational):
40053 (1 Long): 2
source
share