Main Menu

Copying from here to there

Started by Oakland Rob, May 05, 2015, 09:38:16 PM

Previous topic - Next topic

Oakland Rob

I need to copy the lens type or lens ID value to lensmodel in DNGs.

I haven't quite figured it out, but it's needed because apparently lots of applications use lensmodel to display which lens you used, not the other values.

So I'm wondering how to do this, and whether it will mess up my DNGs. Experimenting a bit, I just wrote the value manually into that tag, but wound up with a DNG with the preview borked (I didn't use an overwrite option). Thanks.

Rob

Oakland Rob

BTW, the info is for Pentax lenses that are listed in the Pentax table; one for example is '7 201 = smc Pentax-DA L 50-200mm F4-5.6 ED WR

So I have ID's; I guess LensID that I see is a derived name from that tag. I am trying to get the info in lensmodel in hope that I can then use it to filter in Lightroom, for example. It seems that on import, Lightroom must write the lens name into Lens and LensModel for lenses it has in it's lens profiles; it seems to do it with those lenses and not the others. So I need to do this for lenses that Lightroom and DxO don't seem to know about (and frustratingly, the only difference between the lenses they know or don't know is that "L" in the name of the example above. Or maybe it's the ID no. In any case, it's the same optically).

So I'm a bit unsure of what to copy to where, since for starters I dunno if it should be a ID no or not.

Phil Harvey

Hi Rob,

The command should be:

exiftool "-lensmodel<lensid" DIR

But I would like to have more details about the "borked" preview.  This should not happen.  Are you starting from a DNG straight out of a Pentax camera?  If so, what model?  And what software are you using to view the "borked" preview?  There should be no need to use "an overwrite option".  If you meant the -overwrite_original option, I would recommend NOT doing this so the original image will be preserved with an "_original" extension added.

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

Oakland Rob

Can't reproduce it; I can't remember what I was doing. I think it was adding something to the usercomment. It was odd because normally when something is added to the .dng suffix OS X just throws a EXEC icon over it until I rename it. I found it in the the trash, and it displays correctly, with that unix icon. I suspect that what happened was that I was browsing that folder and the application I was using (not the Finder) displayed something odd. Bottom line, not an exiftool thing.

The command works great. You are wonderful; thanks.

Oakland Rob

Sorry, forgot to ask: how could I change both lensmodel and lens with the same value from lensid at once? Instead of running "lensmodel<lensid" once and then "lens<lensid" a second time? I looked at the -tagsfromfile examples and didn't see anything quite like this.

Phil Harvey

It always surprises me how often this type of question comes up.  I would have thought the answer was intuitively obvious:

exiftool "-lensmodel<lensid" "-lens<lensid" DIR

(This is common mistake number 4.)

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

Oakland Rob

AARGH. SO sorry. It was actually my quotes.

And I used to proofread for money...  :D