2008.08.08 05:15 "[Tiff] Writing custom fields with big counts.", by Tom Harris

2008.08.11 03:16 "Re: [Tiff] Writing custom fields with big counts.", by Tom Harris

I am writing my custom tag as described on the docs page "Adding NewTags".

What I have found is that if your count is greater than 32767, the field_readcount and the field_writecount members of the TIFFFieldInfo struct must be set to TIFF_VARIABLE2 (-3), not TIFF_VARIABLE (-1). This forces 32 bit access, rather than 16 bit access.

Someone with commit rights to the docs might care to update the passage:

``The special value TIFF_VARIABLE2 (-3) is presumably similar to TIFF_VARIABLE though I am not sure what the distinction in behaviour is. This field is TIFF_VARIABLE for variable length ascii fields.''

To:

``If a variable number of values are to be read (such as for variable length ascii fields), then this field is set to TIFF_VARIABLE. However, if the count is to be greater than 32767, then the field must be set to TIFF_VARIABLE2 to force 32 bit access.''

Regards