ExifTool Forum

ExifTool => Newbies => Topic started by: Oakland Rob on May 05, 2015, 09:38:16 PM

Title: Copying from here to there
Post by: Oakland Rob on May 05, 2015, 09:38:16 PM
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
Title: Re: Copying from here to there
Post by: Oakland Rob on May 05, 2015, 09:52:20 PM
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.
Title: Re: Copying from here to there
Post by: Phil Harvey on May 06, 2015, 06:59:08 AM
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
Title: Re: Copying from here to there
Post by: Oakland Rob on May 06, 2015, 01:18:16 PM
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.
Title: Re: Copying from here to there
Post by: Oakland Rob on May 06, 2015, 02:32:33 PM
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.
Title: Re: Copying from here to there
Post by: Phil Harvey on May 06, 2015, 07:04:04 PM
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 (https://exiftool.org/mistakes.html#M4).)

- Phil
Title: Re: Copying from here to there
Post by: Oakland Rob on May 07, 2015, 01:31:59 PM
AARGH. SO sorry. It was actually my quotes.

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