Main Menu

"Camera settings" view request

Started by Beholder3, May 24, 2011, 02:56:18 PM

Previous topic - Next topic

Beholder3

I'll mail the spreadsheet to you next weekend.

Regarding the LensMake thing I was to quick:
I can't make it work using your suggested composite tag.
It returns me the message "no writable tags found".

If I change the source field from LensID to exif:LensModel it works though:
        LensManufacturer => {
            Require => 'exif:LensModel',
            ValueConv => '$val =~ /(pentax|tamron|sigma)/i ? $1 : undef',},

and the command -exif:LensMake<LensManufacturer

The same error occurs when using makernotes:LensType as source.

I guess those fields are actually codes and the string operation fails.

Phil Harvey

Right.  There is no such tag as EXIF:LensMake.

Check the tag name documentation for a list of available tags.

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

Beholder3

Quote from: Phil Harvey on June 07, 2011, 07:12:15 AM
Right.  There is no such tag as EXIF:LensMake.

Check the tag name documentation for a list of available tags.

Confused  ???

There is this tag. It's even documented by yourself... as 0xa433. And I can use it.
As I said, it works when it is filled by taking the data (via composite tag) from "exif:LensModel" and not from "LensID" as your code suggested.

Phil Harvey

Ooop, sorry.  You're right.  I forgot about that new tag added in the Exif 2.3.

In that case I need more specific information to be able to figure out what is going wrong.

What happens when you run exiftool -lensmodel -lensmanufacturer on your file?

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

Beholder3

Using the command and code cited by me in the above post it returns:
Lens Model : Sigma 8-16mm F4.5-5.6 DC HSM
Lens Manufacturer : Sigma

As it should.
The command -LensID gives the exact same output as -LensModel by the way.

Once I change the config file back to use "LensID" the command -lensmanufacturer gives no special output at all. If I run exiftool -exif:LensMake<lensmanufacturer then I get the message the system can't find the specified file.


Phil Harvey

So the LensManufacturer tag is working correctly.  One problem I can see is that your command:

  exiftool -exif:LensMake<lensmanufacturer

requires quotes around the argument, like this:

  exiftool "-exif:LensMake<lensmanufacturer"

Otherwise the "<" symbol will be interpreted by the shell, causing a redirection of the file "lensmanufacturer" to stdin, and resulting in the error.

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

Beholder3

Well, the lensmanufacturer tag is only working well if using the exif:LensModel.
Using the LensID I get the following error now (when typing it in correctly as exiftool "-exif:LensMake<lensmanufacturer"):
Warning: No writable tags found - PICTURE.JPG

I can perfectly live with using exif:LensModel.

Just if you think, it should also work with using LensID as the input giving data field for the composite tag then this would be an issue at least for me because I can' t make it work.

Phil Harvey

Right.  This is what I get for replying from the cottage where I can't test things out.

We need to use the print-converted value ($prt[0]) for this to work:

        LensManufacturer => {
            Require => 'LensID',
            ValueConv => '$prt[0] =~ /(pentax|tamron|sigma)/i ? $1 : undef',
        },


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

Beholder3

Yep. This now works perfectly. :)

Thanks for all the support.

I'll now shut up and let you enjoy your cottage days.  :)