ExifTool Forum

ExifTool => Developers => Topic started by: antoinec on October 30, 2017, 06:16:54 AM

Title: WhiteBalance reported as 'auto' even with -n option
Post by: antoinec on October 30, 2017, 06:16:54 AM
Hi,

The WhiteBalance tag is reported as 'Auto' even when using the -n option. I was expecting the value '1'. Weirdly, in an other file with manual white balance the WhiteBalance is reported as '0'. This is not consistent!

WhiteBalance should be reported as 'Manual' or 'Auto' and with the -n option as '0' or '1'.

As I am processing the tag values in my own application this makes difficult to parse the values. I can easily add a special case for the WhiteBalance tag but this is not very clean and I am worried that I may run into the same issue for other tags.

Is this a a bug? A feature? Is there another way to force numerical value? Am I missing something?!

Phil if you are reading this: a huge thanks for your fantastic tool!

Antoine
Title: Re: WhiteBalance reported as 'auto' even with -n option
Post by: Phil Harvey on October 30, 2017, 07:11:05 AM
Hi Antoine,

Add -a -G option to see all of the WhiteBalance tags and their locations.  As of ExifTool 10.64, there are 65 different WhiteBalance tags that are recognized.

It sounds like you want only EXIF:WhiteBalance.

- Phil
Title: Re: WhiteBalance reported as 'auto' even with -n option
Post by: antoinec on October 30, 2017, 12:20:40 PM
Hi Phil,

Many thanks for your super quick answer!

The problematic image was a JPEG file exported from Lightroom. On further investigation, the reported WhiteBalance is a XMP tag.

The output was produced by using the following options: "-n -j -common".

My goal is too make sure that I get values for the following metadata:
- DateTimeOriginal
- ImageSize
- FocalLength
- ShutterSpeed
- Aperture
- ISO
- WhiteBalance

I don't really care if the values come from EXIF tags (as long as the values are correct). That is why I am simply using the "-common" shortcut option, hoping that ExifTool is able to extract the relevant data automagically.

Instead, I could specify the tags I need as you suggested (such as: -EXIF:WhiteBalance -EXIF:ShutterSpeed). But it appears to be too specific.

For instance, on the same file, using EXIF:ShutterSpeed does not report anything. The options '-common' or '-ShutterSpeed' do report the shutter speed as a Composite tag.

So, should I keep using the '-common' option and handle potentially unexpected values in my code?

Thanks,

Antoine   
Title: Re: WhiteBalance reported as 'auto' even with -n option
Post by: Phil Harvey on October 30, 2017, 12:33:38 PM
Right.  For the other tags -n should give you what you want, but WhiteBalance may be stored as either a number or a string in different metadata types.  And if stored as a number, the numbers may have different meanings in different metadata types.  So for this one, the -n value probably isn't what you want.  I would suggest just dropping -n and seeing if you can deal with the converted values of the other tags in the Common shortcut.

- Phil