Minimum lens length how do I change it??

Started by Gphoto, April 02, 2010, 06:34:28 PM

Previous topic - Next topic

Gphoto

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

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/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Gphoto

#2
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

Phil Harvey

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/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Gphoto

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

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/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Phil Harvey

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/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Gphoto

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

Have attached all exif data from Terminal

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

Phil Harvey

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/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Gphoto

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

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

QuoteHow 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/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Gphoto

Done it
Thank you very much indeed for all of your help
Graham