Hello everybody,
I am looking to apply a script on my pictures, wich one is able to recognize the focal lenght in the metadatas.
I've made a specific series of photo with 3 focal lenght: 50mm;70mm and 105 mm and i wish apply a specific script on my pictures in function of the focal lenght...
I hope you can help me
Best regards
script automation from the focal length metadata
Re: script automation from the focal length metadata
Some information.
Number of Exifs depend on your camera. Example : Nikon Df and Nikon D3x have different Exif numbers.
But Exif codes are constant : 37386 gives the focal length.
I think the following code could help you.
Number of Exifs depend on your camera. Example : Nikon Df and Nikon D3x have different Exif numbers.
But Exif codes are constant : 37386 gives the focal length.
I think the following code could help you.
Code: Select all
#target photoshop
app.bringToFront();
var nbExifs = app.activeDocument.info.exif.length;
for (var i = 0; i < nbExifs; i++)
{
var lensFocal= app.activeDocument.info.exif[i][1];
if (app.activeDocument.info.exif[i][2]==37386) // Code for lens focal
{
alert(lensFocal);
}
}