missing photometric-tag shows white document
ChristHeinrich opened this issue · comments
If the Photometric-tag (for color schema) is missing, the whole document is white. Other Libs e.g. tiff.js can display the file correctly.
Example .tif with this tags:
Tif_WithoutPhotometric.tif
SubFileType (1 Long): Zero
ImageWidth (1 Short): 1728
ImageLength (1 Short): 2444
BitsPerSample (1 Short): 1
Compression (1 Short): LZW
65535 (1 Short): 1
StripOffsets (44 Long): 8, 186, 2033, 4899, 8101, 10084, 10673,...
SamplesPerPixel (1 Short): 1
RowsPerStrip (1 Long): 56
StripByteCounts (44 Long): 178, 1847, 2866, 3202, 1983, 589, 178, 707,...
XResolution (1 Rational): 200
YResolution (1 Rational): 200
ResolutionUnit (1 Short): Inch
Predictor (1 Short): 1
Hi, I think that tag must be present in every TIFF file. So your file is corrupted, it does not correspond to the specification.
I think that updating parsers to handle corrupted files is wrong. If we do it, people will care less and less about the specification, and the corrupted files will become a mainstream.
But I can look into it if you share your TIFF file with us.
Thank you. Here is the file:
CAS_OhnePhotometric.zip
It is fixed too :) although, I have seen a RGB TIFF file also without a PhotometricInterpretation tag. So it is not clear how should be the image interpreted, when this tag is missing.