Photo Exif

About:
This Script AddIn provides a new Command to Opus (PhotoExif) which presents the Exif information from an image file in a dialog. (Nothing that Opus doesn't already do so it's unlikely to be of use to anyone (including me :slight_smile: ) but I'm stuck at home like most of us and playing around with Opus scripting is keeping me from going loopy).

The initial idea was shamelessly copied from a post by @auden - Displaying Metadata Created by "File Meta" .

The dialog allows you to rename the file and add/change the copyright and description information. Clicking on the image preview shows the image in Opus's viewer. If the image has GPS information then you can click the Locate button to launch your browser (mapping service is configurable) to show the location where the photo was taken.

Installation:

History:

  • 1.0 (29/3/20)

    • Initial Release.
  • 1.1 (9/4/20)

    • Added 'update' button to update the dialog when users select a different file in the lister.
    • Dialog now remembers its position.
    • Basic error handling for files that no longer exist.
  • 1.2 (10/4/20)

    • Now automatically monitors for file selection changes and updates the dialog, no longer requires the 'update' button.
    • New config option to toggle the automatic monitoring.
    • Numerous bug fixes relating to non-image file selection.
  • 1.3 (11/4/20)

    • Rotates preview image if rotation data exists. This slows things down a lot so by default it's off but can be toggled on with a new config option : "Rotate Image".
  • 1.3.2 (21/4/20)
    From this version on the script requires the latest beta of DOpus (12.20.1).

    • Now uses the DOpus internal image rotation functionality - much faster.
  • 1.3.3 (23/4/20)

    • Bugfix: File rename had broken somewhere along the line.
    • Bugfix: Clicking the preview image would only show the original image shown in the dialog.
    • Bugfix: GPS co-ords didn't clear properly when an image had none.
    • Added: New Left (โ—„) and Right (โ–บ) buttons which allow you to move file selection in the Lister up or down without having to click in the Lister.
    • Added: Option location_service option in config - allows a choice of which mapping service is used when the Locate button is clicked (Google Maps, Open Street Maps and Bing).
    • Added: Converts Latitude/Longitude to Degrees, Minutes and Seconds.
    • Minor dialog tweaks.

Config:
A number of options are available in the normal Script AddIn configuration editor.

  • dpi - Sets the DPI number which is used to calculate the printable size.
  • inches - Set this to true to show the printable size in inches rather than centimetres.
  • selection_update - If set to true the dialog will monitor for and update the dialog when another image file is selected.
  • image_rotation - Rotates preview image if the image has rotation data (default is off as it slows things down a LOT).
    • From v1.3.2 this option no longer significantly slows things down so the default is now on.
  • location_service - Choose which mapping service is launched when you click the Locate button (options are Google Maps, Open Street Maps and Bing).

Usage:

  1. Download: Photo Exif.dcf (240 Bytes)
  2. Select "Settings/Customize Toolbar..." from your Lister and then drag the button file to any toolbar you like.
  3. Select an image file in the lister and click the new button (Photo Exif). A new dialog should appear displaying the exif information for that file.

While the dialog is displayed, select another image file and the display should update automatically. You can click the Left (โ—„) or Right (โ–บ) arrow buttons to change the file selection.

Editable fields include the Filename, Copyright and Description fields. If you edit these items, click the Apply button to save the changes.

The Locate button will be available only if there are GPS coordinates in the current selected image file. Click the button to show the location of the image in the configured mapping service.

7 Likes

Not bad. How about the ability, to scroll through a list of images in the background, while the EXIF windows adapts to that? I also like the Google Maps function.

:+1:

Interesting idea, not even sure if it's possible.

I tried and tried but couldn't find a way for the dialog to automatically update itself when the user selected a different file. It seems the tab.Update() function only works if it's in the while loop for the dialog and then inside an if (msg.event....). If it's in the while loop but not in an if(msg.event...) statement then nothing happens. Even outputting a line of text to the script log fails. No idea why not.

To work around it I've added a button ("<>") next to the file name which, if you change your file selection in the Lister will update the dialog. Best I can do.

Cool. I have updated the script, it works well. Thanks Steve.

With many thanks to @bytespiller and @leo there's a new version posted above (1.2). No longer requiring an "update" button to recognise file selection changes in the lister, the dialog now monitors and updates itself if a new image file is selected. This behaviour is optional and can be toggled off with a new config setting: "Selection Update".

1 Like

Very nice. Opus' own meta pane is also good, of course, but the EXIF script is even more compact, regarding the key data for photographers. There ist one thing, though, that some images in portrait mode won't be rotated upright, while some others do.

:beers:

1 Like

Yes the rotation thing annoys me too. The scripting method of displaying an image doesnโ€™t seem to allow for image rotation. I think I would have to get the script to read the image to see if it has rotation info, somehow rotate it, then save it to a temporary file and pass that temp file to the dialog. Unless Iโ€™ve missed something obvious in the scripting docs. Will have a play tomorrow.

1 Like

Ok. There's a new version posted above which will look for rotation meta data and if it exists the preview image will be correctly rotated. This is very slow (relying on the built in image rotation commands of DOpus and temporary files) as there's no quick way to rotate an image when applying to a dialog label (that I can see). By default this function is OFF so you need to change the "Rotate Image" option in the script configuration.

@jon / @leo Is there any chance that applying an image to a static label could honour the viewer prefs re. image rotation or the Image object gaining a 'rotation' property please?

It's on our list to look at. Not sure without looking in more detail, but haven't had a chance to yet.

1 Like

There's something for that in the next beta.

1 Like

Works a treat - thanks very much guys.

2 Likes

Works fine. Good job. Thank you

1 Like

Thank you for this script. Since 'Date Taken' is not an Exif field, does your script's 'Date Taken' field read from the Exif DateTimeOriginal field? If yes, I suggest you change 'Date Taken' to Exif DateTimeOriginal.
In most applications (including DOpus) a photo can have a Date Taken without having an Exif DateTimeOriginal. That's why being able to access the Exif DateTimeOriginal field is so important to me.