T O P I C R E V I E W |
MMihelic |
Posted - Jul 17 2012 : 04:18:48 ImageEn will fail during decompression of a TIFF file with the specification bellow. It is unable to decompress data. I have tested the TIFF with several TIFF viewers, and none had a problem with it. The problem with the decompression then excalates to a complete application crash due to the way ImageEn handles the error.
I have put the file in question on one of our servers: https://neosys.si/helpdesk/public_files/MM/02357.TIF
ImageWidth (1 Short): 1984 ImageLength (1 Short): 2806 BitsPerSample (3 Short): 8, 8, 8 Compression (1 Short): Deflate, as recognized by Adobe Photometric (1 Short): RGB FillOrder (1 Short): Lsb2Msb StripOffsets (3 Long): 8, 1197295, 2780928 Orientation (1 Short): TopLeft SamplesPerPixel (1 Short): 3 RowsPerStrip (1 Short): 2806 StripByteCounts (3 Long): 1197287, 1583633, 1612952 XResolution (1 Rational): 240 YResolution (1 Rational): 240 PlanarConfig (1 Short): Seperate PageNumber (2 Short): 0, 1 Software (10 ASCII): IrfanView |
2 L A T E S T R E P L I E S (Newest First) |
MMihelic |
Posted - Jul 17 2012 : 22:22:38 Thank you. It now works correctly. I am quite impressed with the promptness of your support and reply.
-- Regards, Matej. |
fab |
Posted - Jul 17 2012 : 12:44:30 You're right, current version doesn't support this (actually out of TIFF standard) file. The unsupported combination is: - Compression = Deflate (not standard) - FillOrder = 2 (not standard for RGB images, as your) - PlanarConfig = a plane for each channel
Next minor release will support it. Anyway the change is very simple: just open tiffilt.pas, locate Strips2Bitmap procedure and this code:
if TIFFVars.FillOrder = 2 then for i:=0 to szn[c]-1 do ReverseBitsB( pbytearray(bufn[c])[i] );
just after "szn[c] := TIFFEnv.Stream.Read(bufn[c]^, szn[c]);" and inside the for..loop. |
|
|