GP SoftwareTwitter
Opus FAQsManualCommandsObjects

Script to take micro4/3 (MFT) Focal Length & fill 35mm column


I'm totally unprepared to write a script, but I am wondering if anybody has worked on or is interested in developing a script that would look at the Focal Length metadata for all selected/highlighted photos in a directory and multiply each by 2 and write that into the Focal Length (35mm) metadata field.

Olympus E-M1 for some reason does not fill that field, unlike other cameras I've had. It's easy enough to do in my head obviously, but pretty tedious to fill that field in the metadata for each batch of new photos I take.

There is the script column set "ExtendedEXIF". It should be exactly what you're looking for: Columns: Extended EXIF (Picasa faces e.g.)
If you post a picture I can play with, I could add the required bits to make it work for you.

I'm looking at ExtendedEXIF right now and have PMed/emailed you to supply a typical MFT image with exif.

Yep, I noticed. In the meanwhile I downloaded some samples from here:
DO does show information about the focal length in 35mm terms for me for those files (it also does so for my other MFT cameras).
So uhm.. are you really sure this does not work for you? It actually should! o)

Have never seen 35mm equiv FL in the E-M1 metadata without adding that data myself ever since I started using it several years ago.

Well ok, but do the images from show the 35mm FL for you or not?

Did you check camera firmware to be recent?

My email reply to you just bounced. failed after I sent the message.
Remote host said: 550 permanent failure for one or more recipients (:blocked)

Consider writing directly to me: removed
Please do not send resized images, I think out of camera jpg or raw is required in this case.

Got your email, since there is no personal information involved yet, let's continue right here so the next fellow benefits from this conversation.

You did not yet tell us if the images downloaded from the internet show 35mm FL or not, please try so we can rule out it's your cameras fault or your workflow or other tools involved. If you still think of sending me/us some pictures, please do so untouched. You told me it won't make a difference, but that's not how you start analyzing malfunctions like this.

Further more you need to make clear, do you want a column to calculate the 35mm FL or is it some kind of button you like to allow for copying and overwriting whatever is in the (emmpty?) 35mm FL field of your images. I just noticed you are using DO v11, is that correct? This fact might be the reason I/we cannot reproduce what you see, but that's not really proven until you start sending images or telling us what you see for the images I tested.

if you don't have interest in doing a script "that would look at the Focal Length metadata for all selected/highlighted photos in a directory and multiply each by 2 and write that into the Focal Length (35mm) metadata field"*, no need to drag this on. just read the first post, and the email i sent you -- or not.

there is nothing wrong with my specific camera, and it sports the latest firmware. others too have that field blank. it would show up blank in either DOpus 11 or 12.

again, as explained in the email, THERE OFTEN IS NO WORKFLOW -- every jpg straight off the camera is missing the field. other exif viewers/editors that don't have camera specs will also show it as missing or blank. i have heard though that some programs if they have data on specific cameras will fill the 35mm equiv field, since there are other cameras that also don't have it in the native output.

i have checked with other camera users btw. since google was not showing that many mentions (evidently not many notice, understand, or care), i thought to query on a camera forum.

*post #1

I downloaded sample images from another two sources and tested if DO would show something for the 35mm FL field.
It does, but since you resist to repeat this simple exercise, which isn't to hard actually and which might prevent me from investing time into something which might not be required at all, don't expect further assistence from me.

I doubt that images from all three different sources are modified in the same way, so that they eventually show 35mm FL values. Since you also refuse to send simple OOC jpg files of your own, so I can make sure these files really behave differently than the ones to be found everywhere(?) else, I really can't help you.

You need to understand that I am not willing to create a fix for something which is not reproducable for me. I also have little motivation if you don't pull the same string, that is, finding the actual cause for this, which once resolved, could help the next EM1 shooter out there making use of DO.

i don't care if their software or their manual data entry filled the field or not. i did offer to send you images in email and you instead acted here as if i was withholding something. but you never even bothered to reply to the email --

what i was interested in was something that would keep me and other users of MFT cameras that don't supply that field, from having to do it manually if the field even matters to them. but it's not such a big deal to me that i'm going to take a bunch of passive-aggressive stunting. I can find that easily enough on facebook if i actually desire it. i don't need your time if that means further disbelief of how deeply i investigate, how clueless or clued-in i may appear to be, and a general condescension deserved or not.

it was a simple enough query/request: to take the focal length field of any highlighted items and multiply that by 2 and then put it into / write it to the 35mm focal length field. it's even totally irrelevant that if I somehow for several years missed seeing data in that field in DOpus, because of some psychological blind spot that evidently other Oly users have reported too. if it overwrote the exact same data, so what? I certainly wouldn't have cared if it meant that i could FINALLY see it, that it somehow got around my disability ; }

i'm just not going to care now. i can type it in as i've always done in the metadata editing in DOpus, on a per-photo basis.

You offered to send resized images, for which I told you that they are not appropriate for trying to reproduce your problem. I don't know what difference it makes for you to send original instead of resized images, but hey, I guess we are way beyond that point of getting some cooperation going.

I or anyone else could have done that snippet to copy some metadata from here to there, but it would have served only you in the first place, nothing bad about that, but rational sense suggests to figure out what the actual problem is first, so the next user does not run into the same. You can still have the patch if things turn out to be difficult to resolve, nothing wrong with that either, but telling me how to fix your problem in what order is just not right from my point of view, especially since I do this for fun (most of the time).

i dig the fun part. i realize you don't owe me anything. but the rest of what i said stands. there is nothing different about the metadata in the resized images as far as dopus's metadata reader sees it. nor is there in what flickr reports back when i view the metadata there from a full-sized image directly off the camera, never touched by any editing software or re-writes.

If that field is empty, isn't that field dynamically resolved (if there's enough other data) in most other programs?

Yes, some programs resolve it by having the crop ratio on-hand via specific camera profiles regardless of whether the camera itself fills that field. Some DSLRs for instance were missing the field.

I think this script/button will do what you want.

For all selected files, if the file is an image and has Focal Length, but no Focal Length 35mm, it will write Focal Length 35mm as Focal Length x 2.

Fix 35mm.dcf (2.01 KB)

You can drag & drop the .dcf file directly on to your toolbar while in Customize mode. No need to open or edit it. See Button .dcf or .dob files near the bottom of How to add buttons from this forum to your toolbars for more detailed instructions.

Please try it first on some backups of your images in case anything goes wrong. (In fact, it's a good idea to keep pristine backups regardless, since metadata editing could always ruin a file if something does go badly wrong, and it's always good to be able to go back to the original if needed.)

Purely for reference, and to help anyone looking for similar techniques, here's what the script code looks like:

I'll try it out, Leo. when it comes to experimenting/testing usually even my backups have backups; I build a directory up with a bunch of copies when I am smart enough to be paranoid ; }

I've tried a few different scenarios on small and large directories and all go without a hitch. Thanks, Leo!