adding large metadata

Started by Archive, May 12, 2010, 08:53:51 AM

Previous topic - Next topic

Archive

[Originally posted by davidteran on 2005-10-26 22:19:18-07]

Hi,

first of all thanks for this great superb library, its the best i have seen! Is there a way to add -large- data as meta data to an image? I would like to add a lot of information as ascii or utf8 string and wonder what the largest size would be in # of characters / bytes.

I also was not able to define additional / custom xmp tags, even after reading the ExifTool_config file. Is there any additional documentation / hints available ?

regards, David

Archive

[Originally posted by exiftool on 2005-10-26 22:40:02-07]

Hi David,

The maximum size of meta information depends on the file format.  With any TIFF-based format, the limit is around 4GB.  For JPEG though, you are limited by the 64k segment size.  The EXIF information is not allowed to span multiple JPEG segments so any EXIF information is constrained by this limit.  But the Comments are allowed to span multiple segments, so you can write comments as large as you want to JPEG images.

Just rename the "ExifTool_config" file to ".ExifTool_config" and copy it to your home ("~") directory.  After doing this, you should have access to three new XMP tags (NewXMPxxxTag1, NewXMPxxxTag2 and NewXMPxxxTag3) in the XMP-xxx group.  Once you have this working, it should be a simple task to change the tag names and namespace to whatever you want.  If you have any problems, we can discuss them here.  I haven't generated any additional documentation on the subject.

Phil

Archive

[Originally posted by davidteran on 2005-10-28 08:26:27-07]

Hi Phil,

thanks for the quick response. So if i understand it correctly, i can use the comment, either for TIFF and / or JPEG to store a lot of information. I just wonder how i would do this with the commandline tool as the argument in 'exiftool -Comment=mylargecomment test.jpg' cannot exceed the shell's max length for a command. Is there a way of piping it, read it from a file. I checked TagsFromFile but could not figure out how to use it in my case. I could build a text file like 'Comment=mylargecomment' but do not know how to apply it to the image.

I will try out the new xmp tags stuff soon. Would it be possible to store a lotlotlot of information in XMP tags?

regards, David

Archive

[Originally posted by exiftool on 2005-10-28 11:37:04-07]

Hi David,

In JPEG you can use the Comment tag.  In TIFF you should use the ImageDescription, because the Comment tag isn't available in TIFF images.

It is not the -TagsFromFile option you want.  That option extracts tags from an image file.  What you want to do instead is to set the value of a tag from the contents of a file.  It is easy to do this:

Code:
   exiftool '-comment<=comment.txt' image.jpg

Where comment.txt is the name of the file containing the comment.  Note that the quotes are necessary to prevent shell redirection due to the '<'.

To recover a large comment like this, use the following syntax:

Code:
   exiftool -comment -a -b image.jpg > out.txt

XMP is not a good place to put a lot of information since it is limited to a single segment in JPEG images.