Limitation on tag lenght

Gilles Caulier caulier.gilles at gmail.com
Tue Mar 19 07:01:28 GMT 2024


Le mar. 19 mars 2024 à 06:34, Remco Viëtor <remco.vietor at wanadoo.fr> a écrit :
>
> On mardi 19 mars 2024 05:30:00 CET Milind Joshi wrote:
> > Is there any limitation on the length of the tag in digiKam? I am using
> > IPTC tags which are compatible with other programs like darktable, Gimp,
> > IrfanView etc. One of the reasons I am not using the xmp tags is that
> > IrfanView does not display the xmp information. I have noticed that some
> > of the tags are truncated when they are written to tif files, hence
> > would like to know the limit.
> >
> > Also, does this limit apply to individual tags or to a tag and its sub tags?
> EXIF and IPTC have limits on tag lenghts. I don't remember what they are,
> though (but a quick google should help there).

In the Metadata Editor plugin for digiKam and Showfoto, the IPTC tab
contents has all explanations given in tool-tips about string size
limitations.

https://imgur.com/a/dOu8ND0

>
> XMP has in theory no limits on tag lengths.

This is true, with only a special case for JPEG. XMP is stored in a
section which is limited to 64K (there is a way to bypass this
limitation, but Exiv2 shared library used by digiKam does not yet
support this feature). So a very very long text hosted in XMP can
break the section and the file becomes corrupted. In this case, Exiv2
refuses to update XMP to prevent corrupted files.

Other image file formats do not have this kind of XMP size limitation.

Best

Gilles Caulier


More information about the Digikam-users mailing list