2021.02.14 10:16 "[Tiff] Maximum count of characters can write to tag", by Andriy Marchak

2021.02.14 21:46 "Re: [Tiff] Maximum count of characters can write to tag", by Roger Leigh

I can’t believe that the description of an image requires 1 million characters. Perhaps you should be looking at another tag – or even creating a new custom/private tag – for your purposes.

Absolutely agreed Leonard, but this is fairly commonplace, unfortunately. I’ve seen this in quite a few scientific and medical TIFF-based imaging formats.

To provide one example, OME-TIFF is using ImageDescription to embed XML metadata. Usually this is small. For large and complex datasets it can be large (tens to hundreds of megabytes). For exceptional datasets it can be gigabytes. I did suggest use of a private tag, but I’m afraid they had been using it for years before I got involved and they didn’t want to break compatibility with file versions (breaking readers, that is). Can’t say I agreed with that design choice, but it was chosen to maximise interoperability with existing tools.

It’s for this reason that I suggested the possibility of reading and writing subsets of the string data after preallocating space in the file. Even for private text tags, it would be extremely useful and keep memory usage minimised.

On the subject of private tags, is there any news on the TIFF tag registry? Is there a public list of allocated tags in the registry (even if the private ones are redacted, it would be useful to know the allocated and free ranges and document them so no tag is reused accidentally).

Kind regards,

Roger