Hi:
I would like to add some comments
to a image.
First I see that there are 2 different comments
User Comment
and
Comment
Is there a important difference?
I use
exiftool.exe -Comment="Esto es un comentario" mifoto.jpg
But, lets say I have this type of comment
This comments
must be
in 3 different lines
Is it possible?...
I have not been able to solve it.
Thanks
Emilio
I have a multi-line comment.
If I use rdjpgcom, I get
alan@coprolith:temp$ rdjpgcom dscf1704.jpg
Copyright: Alan H. Clifford
Email: alan@clifford.ac
Rubric: Benjamin and a tank
(I suspect this wouldn't be reproduced on a Windows computer).
If I use exiftool, I get
alan@coprolith:temp$ exiftool -s3 -comment dscf1704.jpg
Copyright: Alan H. Clifford.Email: alan@clifford.ac.Rubric: Benjamin and a tank
with dots instead of new lines.
I put this into the copies of the photos that are produced for my website. It is really not neccessary anymore and I did it before I started using exiftool and other tools for putting metadata into the photos. The comment is created with wrjpcom simply by putting comments on a separate line in the bash script
wrjpgcom -replace -comment "${COPYRIGHT}
${EMAIL}
${RUBRIC}" "${UFN}" > "${NEWIMAGE}"
I have a query for Phil. The exiftool documentation states:
exiftool -Comment='This is a new comment' dst.jpg
Write new comment to a JPG image (replaces any existing comment).
My query relates to the use of the singular "comment" whereas the man page for wrjpgcom talks about multiple comments
The JPEG standard allows "comment" (COM) blocks to occur within a JPEG file.
Although the standard doesn't actually define what COM blocks are for, they are
widely used to hold user-supplied text strings. This lets you add annotations,
titles, index terms, etc to your JPEG files, and later retrieve them as text.
COM blocks do not interfere with the image stored in the JPEG file. The maxi-
mum size of a COM block is 64K, but you can have as many of them as you like in
one JPEG file.
What would exiftool do to comments if there were more than one block and I used
exiftool -comment='a new comment' photo.jpg
First, see FAQ number 21 (https://exiftool.org/faq.html#Q21) for more information about how ExifTool handles newlines in values.
To answer Alan's question: ExifTool writes all comments to a single segment, creating multiple segments only if it exceeds the maximum segment size (about 64kB). When reading, ExifTool combines all COM segments.
- Phil
Quote from: Phil Harvey on February 04, 2012, 08:14:31 PM
To answer Alan's question: ExifTool writes all comments to a single segment, creating multiple segments only if it exceeds the maximum segment size (about 64kB). When reading, ExifTool combines all COM segments.
- Phil
I never doubted you for one minute Phil. But interesting to see what the answer was.
Hi:
Well... thanks to both...
I keep working on it.
Emilio