Problem setting MakerNotes:MinFocalLength (Sony a6000)

Started by ecl10, April 06, 2016, 09:46:51 AM

Previous topic - Next topic

ecl10

Hi, all.  First, exiftool is awesome.  Thanks!

I believe I've discovered a bug (I'm using exiftool version 10.13).  In particular, I'm unable to set MakerNotes:MinFocalLength on .JPG from a Sony a6000.

$ exiftool -v -MakerNotes:MinFocalLength="50 mm" pic8.jpg
Warning: syntax error at (eval 45) line 1, in Sony:MinFocalLength (PrintConvInv)     <----------------------
======== pic8.jpg
Rewriting pic8.jpg...
  Editing tags in: APP0 APP1 CIFF ExifIFD IFD0 JFIF MakerNotes
JPEG APP1 (41052 bytes):
  Rewriting IFD0
  ExifByteOrder = II
  Rewriting ExifIFD
  Rewriting MakerNoteSony
  Rewriting ShotInfo
  Rewriting Tag9400c
  Rewriting Tag9402
  Rewriting Tag9403
  Rewriting Tag9404b
  Rewriting Tag9405b
  Rewriting Tag9406
  Rewriting Tag940c
  Rewriting Tag940e
  Rewriting Tag2010g
  Rewriting Tag9050
  Rewriting InteropIFD
  Rewriting IFD1
JPEG APP1 (2819 bytes):
JPEG APP2 (478 bytes):
JPEG DQT (130 bytes):
JPEG DHT (416 bytes):
JPEG SOF0:
JPEG SOS
Nothing changed in pic8.jpg
    0 image files updated               <--------------------------
    1 image files unchanged


As far as I can tell, it looks like a typo in Sony.pm.  Don't we need to transform Sony.pm as follows. . .

$ diff /usr/local/bin/lib/Image/ExifTool/Sony.pm-orig /usr/local/bin/lib/Image/ExifTool/Sony.pm
6111c6111
<         PrintConvInv => '$val =~ / ?mm//; $val',
---
>         PrintConvInv => '$val =~ s/ ?mm//; $val',


In fact, this file has a total of 12 places where I think this transformation needs to be made. With this change, it works for me.  But I'll admit that Perl mostly mystifies me.

Again, thanks for exiftool!

E

Phil Harvey

Nice catch!!

Thanks!  Yes, this was a bug that was propagated through cut-and-paste.

This will be fixed in the next version of ExifTool.

- Phil
...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 ($).