| AWARE [SYSTEMS] | Imaging expertise for the Delphi developer | |||||||
![]() |
TIFF and LibTiff Mailing List Archive | |||||||
LibTiff Mailing List
TIFF and LibTiff Mailing List Archive Contact
The TIFF Mailing List Homepage |
Thread2006.01.16 15:10 "TiffReadEncodedStrip - problem in Delphi", by Patryk PalaszHi All,
I have a strange problem with TiffReadEncodedStrip function in Delphi(7).
There are two 1bit-tiff files - quite similar:
SubFileType (1 Long): Zero
ImageWidth (1 Short): 3451
ImageLength (1 Short): 20924
BitsPerSample (1 Short): 1
Compression (1 Short): LZW
Photometric (1 Short): MinIsWhite
StripOffsets (35 Long): 18812, 27636, 38296, 59544, 87092, 123220,...
SamplesPerPixel (1 Short): 1
RowsPerStrip (1 Short): 606
StripByteCounts (35 Long): 8823, 10659, 21248, 27547, 36127, 34219,...
XResolution (1 Rational): 2540
YResolution (1 Rational): 2540
ResolutionUnit (1 Short): Inch
Software (29 ASCII): Adobe Photoshop CS Macintosh
DateTime (20 ASCII): 2005:04:01 12:12:59
700 (5653 Byte): 60, 63, 120, 112, 97, 99, 107, 101, 116, 32,...
Photoshop (12582 Byte): 56, 66, 73, 77, 4, 37, 0, 0, 0, 0, 0, 16, 0,...
34665 (1 Long): 1470120
SubFileType (1 Long): Zero
ImageWidth (1 Short): 3501
ImageLength (1 Short): 20936
BitsPerSample (1 Short): 1
Compression (1 Short): LZW
Photometric (1 Short): MinIsWhite
StripOffsets (36 Long): 18928, 27602, 38330, 59514, 87270, 123668,...
SamplesPerPixel (1 Short): 1
RowsPerStrip (1 Short): 598
StripByteCounts (36 Long): 8673, 10728, 21184, 27755, 36397, 34282,...
XResolution (1 Rational): 2540
YResolution (1 Rational): 2540
ResolutionUnit (1 Short): Inch
Software (29 ASCII): Adobe Photoshop CS Macintosh
DateTime (20 ASCII): 2005:04:01 12:12:47
700 (5653 Byte): 60, 63, 120, 112, 97, 99, 107, 101, 116, 32,...
Photoshop (12690 Byte): 56, 66, 73, 77, 4, 37, 0, 0, 0, 0, 0, 16, 0,...
34665 (1 Long): 1497716
But the second one makes me a lot of problems - because I CAN NOT display
it! I mean - there are some strange stripes and it doesn't look like it
should - simply unrecognizable! Here is a small part of code I use - works
fine with first picture.
BitmapBuff := FBitmap.ScanLine[ FImgHeight - 1];
for i := FStripsCnt - 1 downto 0 do
begin
read := TiffReadEncodedStrip( FTiffFile, i, Buff, -1);
if read <> -1 then
begin
if FFillOrder <> FILLORDER_MSB2LSB then
ChangeBitsOrder( Buff, read);
ChangeLinesOrder( Buff, BitmapBuff, read);
Inc( BitmapBuff, read);
end;
end;
The Bitmap's PixelFormat is of course pf1bit.
Thanks in advance - Patryk Palasz.
|
|||||||