Usage of Exif "UserComment"?

Started by obetz, April 10, 2019, 05:00:13 AM

Previous topic - Next topic

obetz

Hi,

is there any guidance how to use Exif 0x9286 User Comment?

The MWG guidance mentions a phrase "user comment" in one place but according to the following paragraph(s) it seems that they meant 0x010e ImageDescription.

Am I right that the exiftool's MWG composite tags don't deal with 0x9286 User Comment?

Oliver

Phil Harvey

Hi Oliver,

Interesting.  I didn't notice that the MWG "Description" field uses the EXIF ImageDescription tag, but they say it is also known as "user comment".  They provide no guidance for how to use UserComment.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

obetz

Hi Phil,

sorry for chosing the wrong forum initially.

IMO it's pretty bad that mwg_guidance.pdf mentions a "user comment" field without telling from which universe this name is.

The Exif tag "UserComment" is mentioned repeatedly, but under 5.2 "Description" they only list 0x010e ImageDescription as a counterpart to "Description".

According to JEITA CP-3451, UserComment is rather special thing with a hairy character encoding hack in the first 8 bytes (shudder, didn't know this till now). It might be intended to hold an less restricted copy of ImageDescription: "A tag for Exif users to write keywords or comments on the image besides those in ImageDescription, and without the character code limitations of the ImageDescription tag."

IMNSHO, Exif is not a good place to hold user generated text and therefore the relevant fields simply should left empty, but MWG probably doesn't share my opinion.

Oliver

Phil Harvey

Hi Oliver,

Quote from: obetz on April 10, 2019, 07:45:56 AM
sorry for chosing the wrong forum initially.

No worries.

Quote
The Exif tag "UserComment" is mentioned repeatedly, but under 5.2 "Description" they only list 0x010e ImageDescription as a counterpart to "Description".

Yes.  They talk about the character encoding for UserComment, but not what it is used for.

QuoteAccording to JEITA CP-3451, UserComment is rather special thing with a hairy character encoding hack in the first 8 bytes (shudder, didn't know this till now).

It isn't that hairy.  The main problem is that it doesn't support modern character sets like UTF-8, and the byte ordering for multi-byte characters is not specified.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

obetz

Thanks for the information. I didn't know that UCS-2 leaves the byte order undefined.

Can you just confirm that ExifTool does not write to 0x9286 User Comment by any built-in MWG translation?

I don't find such a translation in the current .args files, but software I'm using populates the "User Comment" field which I consider unexpected.

Before reporting this, I just want to be sure that this is not an ExifTool decision.

Oliver

Phil Harvey

Quote from: obetz on April 10, 2019, 10:48:13 AM
Can you just confirm that ExifTool does not write to 0x9286 User Comment by any built-in MWG translation?

The only difference when the MWG module is enabled is that UTF-8 is assumed if the UserComment coding is ASCII.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

filmaj

Quote from: Phil Harvey on April 10, 2019, 08:16:24 AM
It isn't that hairy.  The main problem is that it doesn't support modern character sets like UTF-8, and the byte ordering for multi-byte characters is not specified.

- Phil

Hi, long-time listener, first-time caller here. Love the fantastic tool. Big fan, thanks for all your work.
Came across this comment and was wondering what your thoughts are about using the first 8 bytes to specify whatever character encodings we could wish for? I'm sort of doing that now in one of my projects...

Phil Harvey

You could do that if you want, but only your software would be able to read these encodings.  It would be possible to get ExifTool to read/write this by overriding the UserComment definition with a user-defined tag.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).