ExifTool Forum

ExifTool => Bug Reports / Feature Requests => Topic started by: herb on August 08, 2020, 01:08:25 PM

Title: "unknown" value for -exif:offset... tags
Post by: herb on August 08, 2020, 01:08:25 PM
Hallo Phil,

The Olympus camera OMD EM5iii writes all -exif:offset... tags with values: "   :  ".
This is allowed by EXIF standard and means: value is unknown.

Exiftool 12.03 displays these values as:
OffsetTime                      :    :
OffsetTimeOriginal              :    :
OffsetTimeDigitized             :    :


For me it is a little bit difficult to realize the value "   :" (trailing spaces are removed).
So I would like to propose to display these values as "--:--".

Thanks in advance and
Best regards
herb
Title: Re: "unknown" value for -exif:offset... tags
Post by: herb on September 12, 2020, 02:14:53 AM
Hello,

No comment!?
Is it really a bad idea?

Regards
herb
Title: Re: "unknown" value for -exif:offset... tags
Post by: Phil Harvey on September 12, 2020, 09:41:11 PM
Somehow I missed this post.

I don't really like the idea of changing the spaces to dashes in the time.  I would have to check the specification, but spaces are valid in other date/time fields and ExifTool doesn't translate these either.

- Phil
Title: Re: "unknown" value for -exif:offset... tags
Post by: herb on September 13, 2020, 02:43:55 AM
Hello,

Thanks for your comment; I understand.
My proposal was based on the fact that ExifTool removes the trailing spaces after ":" in case of display. So it is difficult to "recognize" the ":".

Best regards
herb
Title: Re: "unknown" value for -exif:offset... tags
Post by: Phil Harvey on September 13, 2020, 08:54:43 AM
Hi Herb,

Why is it difficult to recognize the ":"?

- Phil
Title: Re: "unknown" value for -exif:offset... tags
Post by: StarGeek on September 13, 2020, 11:58:01 AM
Other options would be using -api "Filter=s/ /-/g" to swap spaces for hyphens, though that would be global. 

The other option would be to make user defined tags for these to do the swap.
%Image::ExifTool::UserDefined = (
'Image::ExifTool::Composite' => {
MyOffsetTime => {
Require => 'OffsetTime',
ValueConv => '$val =~ s/ /-/g;$val',
},
MyOffsetTimeOriginal => {
Require => 'OffsetTimeOriginal',
ValueConv => '$val =~ s/ /-/g; $val',
},
MyOffsetTimeDigitized => {
Require => 'OffsetTimeDigitized',
ValueConv => '$val =~ s/ /-/g;$val',
},
},
);
#------------------------------------------------------------------------------
1;  #end


Edit: Updated config file so it will pass through original data if no changes are made
Title: Re: "unknown" value for -exif:offset... tags
Post by: herb on September 13, 2020, 01:29:35 PM
Hello Phil, hello StarGeek,

@StarGeek: Thanks for your proposal; But I think only on tags that represent a timezone-value.

QuoteWhy is it difficult to recognize the ":"?

Looking at the following timezone-values
tag1     :   +01:00
tag2     :      :
tag3     :    --:--

I thought that tag3-line looks better than tag2-line. That's all.

Thanks and best regards
herb
Title: Re: "unknown" value for -exif:offset... tags
Post by: Phil Harvey on September 13, 2020, 02:13:42 PM
Hi Herb,

Quote from: herb on September 13, 2020, 01:29:35 PM
tag3     :    --:--
I thought that tag3-line looks better than tag2-line. That's all.

I agree, but I don't think this is worth changing, especially because people familiar with the EXIF specification may expect spaces.

- Phil
Title: Re: "unknown" value for -exif:offset... tags
Post by: StarGeek on September 13, 2020, 03:05:15 PM
Quote from: herb on September 13, 2020, 01:29:35 PM
@StarGeek: Thanks for your proposal; But I think only on tags that represent a timezone-value.

That's why listed a config file.  It only affects the three OffsetTime tags. Example output:
C:\>exiftool -config MyOffset.config -g1 -a -s -offset* -myoffset* y:\!temp\Test4.jpg
---- ExifIFD ----
OffsetTime                      : +07:00
OffsetTimeOriginal              :   :
OffsetTimeDigitized             : +07:
---- Composite ----
MyOffsetTime                    : +07:00
MyOffsetTimeDigitized           : +07:--
MyOffsetTimeOriginal            : --:--
Title: Re: "unknown" value for -exif:offset... tags
Post by: herb on September 14, 2020, 02:59:32 AM
Hello StarGeek,

Yes, you are right; I should have thought on user-defined tags at the very beginning.

Best regards
herb