There are still some issues present.xnview wrote: * TIFF tags order - http://newsgroup.xnview.com/viewtopic.php?f=36&t=20222
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
Those two issues cause warnings in libtiff based software, such as imagemagick & GIMP.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.
Thank you.