Question to Exif:UserComment

Started by herb, February 02, 2017, 08:06:46 AM

Previous topic - Next topic

herb

Hello Phil,

today I started to work with RawTherapee (a RAW converter) version 5.0.
I assigned the 2 tags Exif:UserComment and also Exif:ImageDescription to a *.orf image and stored the output as *.jpg file.
Both tags contained Ascii characters and also some chinese characters.

In order to compare the results, I also wrote the identical tags with Exiftool 10.41 and have seen the following:
- ImageDescription has been written in identical form by Exiftool and by RawTherapee.
- UserComment has been stored differently:
  Exiftool wrote: UNICODE followed by tag-value encoded in UCS2
  RawTherapee wrote: ASCII followed by tag-value encoded in UTF8

My question now is:
Is the format used by RawTherapee a legal/valid format for this tag?

Thanks for youre comments in advance
Best regards
Herb

Phil Harvey

Hi Herb,

The format for UserComment used by RawTherapee is acceptable in the expanded definition of EXIF ASCII values as endorsed by the MWG, but is technically invalid according to the strict EXIF definition.

- Phil

Edit:  I just checked the MWG 2.0 specification, and I was wrong.  UTF-8 is only recommended for string-type tags, not for tags like UserComment which specify an encoding.  The MWG spec says: "Exif tags such as UserComment that have an encoding prefix SHOULD be written as ASCII if all bytes fit in the 7-bit range 0..127, and MUST be written in some other encoding if any byte is outside the 7-bit range".  So RawTherapee is wrong according to both specifications.
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

herb

Hello Phil,

thanks for your detailed answer.

Best regards
Herb