2005.01.30 11:25 "Re: [Tiff] converting tags", by Andrey Kiselev
On Mon, Jan 24, 2005 at 10:36:53PM -0800, Lee Howard wrote:
Currently FaxRecvParams is typed as uint32. The problem is, though, that per Table 2/T.30 (the description of all possible fax session parameters, specified by the sender in a "DCS" signal) there are more than 110 possible bits. So basically the "encoding" is just a compression of sorts of that 110+ bits into 24-32 bits, and we have to be rather selective about how we do it, and sooner or later we're inevitably going to run out of bits. It is rather difficult to continually update and revise HylaFAX's "encoding" function for FaxRecvParams every time we add more support for various things on Table 2/T.30, and we'd like to simply store the DCS signal raw into FaxRecvParams rather than compressing/encoding it.
However, I don't know how easy it is to change TIFFTAG_FAXRECVPARAMS from uint32 to char* in libtiff. The bigger issue, however, is that we'll need to be able to successfully TIFFGetField(tif, TIFFTAG_FAXRECVPARAMS, ...) on old TIFFs and retreive the data, at which point we can make use of it.
I'm not a TIFF tag expert, but I assume that the uint32 tag is stored as 4 bytes.
Maybe we should just use a different tag instead?
It is pretty easy to change the tag representation from one data type to another, but you are absolutely correct that we will suffer from compatibility problems. So the best solution should be allocating the new tag. You can try to ask Adobe to reserve the tag number for Hylafax (I think that Chris Cox may be the one who knows in advance how to do this).
When you will have the special tag I can add support for it into libtiff.
Andrey V. Kiselev
Home phone: +7 812 5970603 ICQ# 26871517