Author Topic: Minimum lens length how do I change it??  (Read 8434 times)

Gphoto

  • Newbie
  • *
  • Posts: 8
Minimum lens length how do I change it??
« on: April 02, 2010, 06:34:28 PM »
Having a problemin changing the minimum lens length using an automator script.
All exif changes ok except -LensMinMM='24.0mm' see below
Can anyone help me out please

for f in "$@"
do
   exiftool -LensMinMM='24.0mm' -Lens='AF-S NIKKOR 24-70mm f/2.8G ED' -MaxApertureValue='2.64' -overwrite_original_in_place "$f"
done

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16885
    • ExifTool Home Page
Re: Minimum lens length how do I change it??
« Reply #1 on: April 03, 2010, 07:54:24 AM »
The problem is that there is no tag named "LensMinMM".  Reading FAQ number 3 may help you to determine the proper tag name.  I'm guessing it is MinFocalLength that you are looking for.  If so, FAQ number 23 may also apply because this value may only be written in a file which contains the Nikon maker notes.  Also note that the LensID tag uses this value to determine the lens used, so writing this value will affect this.

As well, you should be able to simplify your script to remove the for loop:

exiftool -MinFocalLength='24.0mm' -Lens='AF-S NIKKOR 24-70mm f/2.8G ED' -MaxApertureValue='2.64' -overwrite_original_in_place $@

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

Gphoto

  • Newbie
  • *
  • Posts: 8
Re: Minimum lens length how do I change it??
« Reply #2 on: April 04, 2010, 10:07:52 AM »
Hi Phil
Thank you very much for taking the time to reply.
I have looked into the data and have found these 2 files that may answer the question but with my limited knowledge I am still a bit confused.
See attached screen shots.

[edit] PH - removed duplicate attachments
« Last Edit: April 05, 2010, 07:17:09 AM by Phil Harvey »

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16885
    • ExifTool Home Page
Re: Minimum lens length how do I change it??
« Reply #3 on: April 05, 2010, 07:15:29 AM »
I've taken a look at your screenshots.  I'm assuming you want to change the metadata in the .apversion file?  This is an XML file.  ExifTool doesn't write XML files.

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

Gphoto

  • Newbie
  • *
  • Posts: 8
Re: Minimum lens length how do I change it??
« Reply #4 on: April 05, 2010, 11:40:28 AM »
Hi Phil

Thank you again for reply I think I need to back up slightly ,
I have used "exiftool -a -G1 FILENAME" from your FAQ and it does say MinFocalLength so I have used that and it still will not change when importing to aperture. See screen shot.
This is what i want to achieve it reading 24mm in aperture
Graham

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16885
    • ExifTool Home Page
Re: Minimum lens length how do I change it??
« Reply #5 on: April 05, 2010, 12:32:55 PM »
There are 2 reasons this could happen:

1) Aperture could be reading the min focal length from another tag in the file.  Try doing "exiftool -a -G1 FILE | grep -w 18" to see if exiftool extracts any other tags with the value 18 mm.

2) Aperture could have cached this information so that it won't change in the display even if you change the file.  I don't know if Aperture is prone to this problem, but I have seen similar things in the past with other software.  Sometimes you need to re-import the image to get it to change.

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

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16885
    • ExifTool Home Page
Re: Minimum lens length how do I change it??
« Reply #6 on: April 05, 2010, 01:45:38 PM »
Aperture could also be using the LensIDNumber to determine the lens characteristics.  You could try changing this to 147 (0x93 hex) if it isn't already (with "-lensidnumber=147").

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

Gphoto

  • Newbie
  • *
  • Posts: 8
Re: Minimum lens length how do I change it??
« Reply #7 on: April 05, 2010, 05:31:46 PM »
Phil

 have tried this and it showed screen shot
I do import fresh photo each time I use automator maybe this is not possible

Gphoto

  • Newbie
  • *
  • Posts: 8
Re: Minimum lens length how do I change it??
« Reply #8 on: April 05, 2010, 05:33:41 PM »
Have attached all exif data from Terminal

Thanks again for all the time you are spending on this
Graham

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16885
    • ExifTool Home Page
Re: Minimum lens length how do I change it??
« Reply #9 on: April 06, 2010, 07:11:03 AM »
The Nikon "Lens" tag still says the lens is 18-70mm.  Perhaps Aperture is getting the value from here.

- Phil

P.S.  It is better to attach a text file instead of a screen dump -- smaller and easier to search: "exiftool -a -G1 -s FILE> out.txt" and attach "out.txt".
...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 ($).

Gphoto

  • Newbie
  • *
  • Posts: 8
Re: Minimum lens length how do I change it??
« Reply #10 on: April 06, 2010, 04:59:36 PM »
Oops yea that would be better sorry
I hope this to be the last question for you How do I change the Nikon Tag.
This is what I am running at the moment.

for f in "$@"
do
   exiftool  -a -MinFocalLength='24.0mm' -lensIDNumber=147 -Lens='AF-S NIKKOR 24-70mm f/2.8G ED' -MaxApertureValue='2.64' -overwrite_original_in_place "$f"
done

Thank you

Gphoto

  • Newbie
  • *
  • Posts: 8
Re: Minimum lens length how do I change it??
« Reply #11 on: April 06, 2010, 05:21:47 PM »
Just a thought
I have just run the shell script on a picture taken with a lensbaby so therefore there was no old info that aperture could take on or keep and it didn't change the min lens length see attached text file. At least I have learn't something

Graham

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16885
    • ExifTool Home Page
Re: Minimum lens length how do I change it??
« Reply #12 on: April 06, 2010, 07:11:10 PM »
Quote
How do I change the Nikon Tag

Actually, I could improve exiftool so your command will change the Nikon:Lens tag as is.  But the current version of exiftool requires the Nikon:Lens tag to be formatted like this (the value is actually stored as 4 floating-point numbers):

-Nikon:Lens="24-70mm f/2.8"

I will be more flexible about the formatting of the Nikon:Lens value in ExifTool 8.17.

Any non-chipped lens will not report reasonable values for any of the lens data in the images.  This is true for a LensBaby and any other totally manual lens.

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

Gphoto

  • Newbie
  • *
  • Posts: 8
Re: Minimum lens length how do I change it??
« Reply #13 on: April 07, 2010, 11:04:58 AM »
Done it
Thank you very much indeed for all of your help
Graham