1.98: TIFF Tags

Bugs found in XnView Classic. Please report only one bug per topic!

Moderators: helmut, XnTriq, xnview

Post Reply
yaunxn
Posts: 2
Joined: Mon May 09, 2011 12:28 pm

1.98: TIFF Tags

Post by yaunxn »

There are still some issues present.

First, if a Model tag (272) is present in the source file, it is always added after all other tags, i.e. tags are still not sorted in ascending order.
Please note that "Export" operation removes the Model (272) tag, while "Save as" does not.
tiffdump output:

Code: Select all

tiffdump test_gray8_save_as.tif

test_gray8_save_as.tif:
Magic: 0x4949 <little-endian> Version: 0x2a
Directory 0: offset 8 (0x8) next 0 (0)
ImageWidth (256) LONG (4) 1<2480>
ImageLength (257) LONG (4) 1<3506>
BitsPerSample (258) SHORT (3) 1<8>
Compression (259) SHORT (3) 1<32946>
Photometric (262) SHORT (3) 1<1>
StripOffsets (273) LONG (4) 1<272>
SamplesPerPixel (277) SHORT (3) 1<1>
RowsPerStrip (278) LONG (4) 1<3506>
StripByteCounts (279) LONG (4) 1<6732163>
XResolution (282) RATIONAL (5) 1<300>
YResolution (283) RATIONAL (5) 1<300>
PlanarConfig (284) SHORT (3) 1<1>
ResolutionUnit (296) SHORT (3) 1<2>
Software (305) ASCII (2) 32<LIBFORMAT (c) Pierre-e G ...>
Predictor (317) SHORT (3) 1<1>
Model (272) ASCII (2) 17<PSC 1200        \0>     <- I'm talking about this
Second, xnview always adds Predictor (317) tag to the file, regardless of compression, which is, I believe, an error, because in TIFF specification, section 14, it is written that
A predictor is a mathematical operator that is applied to the image data before an encoding scheme is applied.
Currently this field is used only with LZW (Compression=5) encoding because LZW is probably the only TIFF encoding scheme that benefits significantly from a predictor step.
Those two issues cause warnings in libtiff based software, such as imagemagick & GIMP.

Thank you.
User avatar
xnview
Author of XnView
Posts: 46238
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: 1.98: TIFF Tags

Post by xnview »

I've sent you a PM
Pierre.
Post Reply