Does anyone know if the combination of PackBits compression (tag 259; value 32773) and Horizontal Differencing Predictor (tag 317; value 2) is a) allowed according to the TIFF spec? And, b) generally supported in software?
What I have found so far, is that the TIFF 6.0 spec says the following about Predictor:
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.
According to this page (which seems to be one of the best TIFF resources on the web):
Theoretically, the predictor step is independent from the compression step, and thus can be combined with any compression scheme. It is, however, likely to be most usefull when combined with either LZW or Deflate compression.
I'm developing a TIFF image writer plugin for Java ImageIO, and some quick testing shows that the PackBits compression also benefits from the predictor step. My plugin can read/write the combination without problems, but the reason I'm asking is it seems like Preview (probably OS X' ImageIO framework) does not support this option (image is displayed, but without the predictor step applied). Not sure what LibTiff etc. does.
PS: The combination of ZLib/Deflate and Predictor seems to work fine in all software I've tested, so at least it's not strictly tied to LZW.