Geotag your photos in Lightroom Classic

A gentleman in tan hat and plaid shirt standing at a busy car boot sale in Bantry with market stalls and shoppers browsing various items spread on tables, County Cork.

Geotagging your photos means adding location data to the image so they can be displayed on a map. Be aware that doing so might reveal sensitive information you’d rather keep secret like your home address.

You can of course remove location data when you export images, like I did with the images in this post.

Anyway, here is how I geotag my photos.

For photos I’ve already taken, I use Google Timeline and export it from my Google account using Google Takeout. You’ll get a rather large “Recent.json” file out of that. To convert that file into the GPX format usable by Lightroom Classic, use this Python script which I’ve already covered in this post.

When I go out with my camera now I use the Anrdoid app, OpenTracks. It’s a free app you can grab from f-droid, but there’s also a paid version on the Google Play Store if you want to support the developer. You can also use GPSLogger, a free app that has the advantage of being able to save your .gpx files to Dropbox or Google Drive.

On iOS, the myTracks app appears to do a similar job but I can’t test it. Please comment if you have tried it or know of decent alternatives.

To geotag your photos in Lightroom Classic, the Adobe documentation on the subject is excellent. Once you’ve opened the Map Module and done it once it’s easy to do again. When you geotag your photos, the Map Module will look like this.

A satellite view of Cork City with a blue line showing where I walked and orange squares showing how many photos I took at various locations.

There is also Jeffrey’s “Geoencoding Support” Plugin for Lightroom that I’ve used for years but maybe it’s because of changes to LrC in recent years, it’s gotten really slow for me. I usually use the built in LrC functionality in the Maps module now.

Lossy DNG isn’t so bad

Have you ever converted a RAW file to lossy DNG and noticed how much smaller it was? You can make the RAW file 80-90% smaller! I always thought of lossy DNG files as JPEG files saved at a compression level of 10 or 100%. In other words, with barely anything stripped, but it’s more interesting than that.

I discovered that a panorama I made in Lightroom was a lossy DNG. After I made it, I tried converting it to lossy DNG, and the new file was the same size as the old one. So, panoramas are lossy DNG. They used to be huge files, but, in Lightroom 13.0 that changed. Adobe started using Jpeg XL instead of Jpeg to store data in lossy DNG files. Even though the files are smaller, they are higher quality than older panoramas! It’s the same with HDR and Denoise. Remember when Denoise was introduced and the files it made were gigantic?

HDR images created by Lightroom are also now saved using the same lossy DNG format. An HDR image I created in 2017 on my 24MP Sony A7III is 77MB, but using Lightroom 13.3.1 that file is only 11.9MB. When I convert the image manually to lossy DNG with an embedded medium Jpeg and fastload data, the file reduces further to 8.1MB and looks practically the same at 100%.

I haven’t noticed any major problems fixing highlights or shadows in panoramas, so lossy DNGs are pretty good, but not without their own drawbacks, which I’ll get to later.

On the Adobe forums someone noticed this last year, and received a few interesting replies:

The compression method for derived DNGs has been changed from JPEG to JPEG-XL, which provides a smaller data footprint without loss of quality.

Creating a merged DNG such as a panorama is already a “lossy” process because the merged pixel data has been demosaiced, aligned, and blended from the original photos. Using JPEG XL compression makes a much smaller visual change.

Do not look at the words ‘lossy’ and ‘lossless’, look at your image and see if there is any visible effect of this new compression method. Recreate an older panorama and compare the old massive DNG with the new, much smaller DNG. Do you have any reason to be concerned?

Before you convert all your RAW files to lossy DNG, be aware that it will affect how Lightroom treats your file in ways you mightn’t think of. Years ago, I noticed that the Transform tool worked differently on lossy DNG files. It straightened walls slightly differently, not that it looked wrong, just different. You also can’t feed DNG files to Topaz Photo AI (Files->Plugins Extra->Process with Topaz Photo AI) or Lightroom Denoise, so use those before making your panorama or making the file a lossy DNG.

This is an example of a simple image that transforms differently when it was converted to a lossy DNG file. Lens correction has been applied to both images, and they are identical then. However, when “auto” transform is applied, the lossy DNG is modified differently. This bug has been there for years. If you want to compare yourself, here is the before image, and here’s the after image.

Greg Benz has published a post on the subject too and came up with the idea of exporting images to lossy DNG “to the same folder” and adding them back to the catalogue, making it easier to compare before and after images before you delete files. He points out some other problems I never noticed with lossy DNGs, such as haloing and colour tones, and other unspecified issues with older RAW images imported before 2012.

Is it worth converting your RAW files to lossy DNG? You’ll make savings of up to 90% and that’s very tempting. A 66MB RAW file may become a 9MB lossy DNG file. If you don’t like deleting, but you’re sure you’re not going to use an image, then it may be an option for you. On the other hand, use with caution on photos you want to edit and publish.

A comment on this video suggests loading the original photo and the lossy version into Photoshop as layers and use the “difference” blend more on the top layer. You’ll notice tiny changes between the images. Since I have deleted the original RAW file of the photo above, here’s one of the lighthouse at Ballycotton.

Here’s what the difference looks like in Photoshop.

There are obvious differences when you look at it like this, but I still think it’s worth considering. Today’s photo on my photoblog, The Rocks of Ballycotton, is a lossy DNG file for example.

And finally, one thing to consider is that third-party software support for lossy DNG files might not be what you expect. I haven’t tested any of the open-source software out there, so I’m not sure how good it is. A comment on that video I linked to above says RawTherapee handled them, and that was 6 years ago, so I’m sure the situation has improved since then.

While in the process of researching this, it has been so nice to find actual open, public, online forums and blogs talking about this, and not just on Reddit either. I bet there must be plenty of conversation about it hidden in Facebook groups too. Hidden from prying eyes.

Howto: Geotag photos in Lightroom with Google Timeline data

One feature in Adobe Lightroom that many don’t use often is the Map module. It’s really useful if your camera has GPS, if it can connect to your phone GPS, or if you manually drag images onto a map. I use the Sony “Imaging Edge Mobile” app to connect my camera to my phone via Bluetooth, but this drains the battery quickly when I’m out for a long time. It’s not ideal. If I want to use the Bluetooth remote control (not the app, the physical remote) I can’t use the location feature.

The changing of the guard. A guard approaches the camera. His dress uniform is a red cap with a long black silk tuft. His uniform is brown, and his shoes have a black tuft at the top. He has a grave expression on his face. Another guard stands in the background, facing away.
The changing of the guard at the Tomb of the Unknown Soldier, Athens, Greece.

The battery life of my camera when “Airplane mode” is enabled is stellar. Not so much when using a Bluetooth connection. If I know I’ll be out for an entire day, I’ll toggle it on and off and usually remember to do it on both devices, and sometimes I even make sure to check the next image has embedded GPS data!

Google Timeline is a feature that records your location data over time, using your phone’s GPS. This data can be very useful for geotagging photos because it provides a detailed record of where you’ve been. I’ve long wondered if I could use that GPS data to geotag my photos. You can export the entirety of your location data from Google using their Google Takeout tool. If you’ve had a Google account for a long time, that file will probably be well over 1GB is size if you had location sharing enabled. Unfortunately, it’s not in a format that Lightroom understands, and may contain many years worth of location data.

A few months ago, I decided to try writing a script that convert the Google Timeline JSON data into the GPX format that Lightroom wants, but I didn’t get very far, as “real life” intruded, and it was yet another project left on the long finger. I was looking forward to a day when I had sufficient time and energy to look at it.

The ruins of the Temple of Poseidon. A tree stands in the foreground, as well as some blocks with the prominent structure of columns and some horizontal pieces visible in the background.
The Temple of Poseidon in Sounion, Greece.

I’m glad I dropped it because I found someone had already created such a script, and it can consume a gigantic Records.json file. It will spit out the GPS data for any date range I want in GPX format. I discovered a Lightroom extension that makes importing that file easy, and it massages the data if a photo is taken in between points too.

The conversion script is a Python one called location-history-json-converter that can be found here. It’s relatively easy to install on Linux or macOS. If you use Windows you hopefully know how to get Python installed.

Once installed, I ran the following command to extract the GPS data I wanted for the first 17 days of May this year, and output it in the GPX format.

./location_history_json_converter.py Records.json records.gpx -f gpx -s 2024-05-01 -e 2024-05-17

That produced a nice 1.3MB file from the huge Records.json file.

The Maps module in Lightroom does allow you to import tracklogs, but I’ve used it in the past, and sometimes it missed photos, maybe because my tracklog wasn’t recording points often enough. This time I used Jeffrey Friedl’s geoencoding extension for Lightroom. The ability to adjust the timezone was critical to me, as I wanted to geoencode or geotag the photos I took on a recent trip to Greece.

A train covered in graffiti with people visible through the windows.
On the metro in Athens, Greece.

I messed up the first time and told it to adjust the timezone by 2 hours, the difference between Ireland and Greece but that was an hour out, possibly because of daylight savings time settings somewhere in the mix of camera, phone and exported data. I was really annoyed with myself over that because the plugin allows you to choose only “unmapped photos”, but now every photo was mapped. 75% of them were mapped to the wrong location!

I realised it didn’t matter because the originally geotagged images were tagged off my phone, so they had the same location data as Google Timeline. I went slower a second time, picking a couple of test images of places I knew, and by adjusting the timezone by 3 hours, I saw that it worked perfectly. I ran the job again against more than 1800 images and those images were geotagged correctly.

In the past, I used a GPS logger app to log my location to my phone. That created a GPX file, but I completely forgot I had that installed and simply used the Sony app connected to my camera for a long time. The Google Timeline data is already there because I allow Google to log that data, so it’s a handy source of this information. I can attempt to geotag years worth of photos now, but I’ll have to go slow, as I know the time on my camera drifts, so that will have to be accounted for.

Uh oh. Is adobeyourshotyourstory.com gone astray?

This morning I saw a notification on the Adobe “Creative Cloud” app I can get pro tips for photographing people…. etc etc. I thought it was the usual material Adobe brings out, which to be fair, is quite good, so I clicked it.

It’s odd that the news item is from a week ago, but I only saw the notification now, but that happens. The page loaded in the background while I checked other things in another window. I glanced back and saw the ublock origin was stopping a tracking redirect. Uh oh. The only thing I had loaded was that Adobe link. Curious, I let it through until it redirected to a spam page on iyfbodn.com.

I was expecting something that looked more like the website that was archived last year. A quick whois of adobeyourshotyourstory.com shows it was updated in October last year, but the domain now appears to be owned by someone in Tbilisi, Georgia!

I am very interested to hear how this happened. It’s one thing to take over a prominent domain (Adobe last mentioned the domain on Twitter in June 2022) but to get a notification in the Creative Cloud app that redirects to a spam site is quite an achievement. Unfortunately.

Drag the Lightroom Histogram

I discovered yesterday (or maybe rediscovered?) that you can drag the histogram in Lightroom to adjust the exposure of a photo.

From right to left, these are the sliders affected when you drag:

  • Blacks
  • Shadows
  • Exposure
  • Highlights
  • Whites

It can appear like a blunt, inaccurate tool to modify the exposure of a photo, but do it at least once, and you’ll get a better appreciation for what the histogram actually displays.

Originally shared on Mastodon yesterday.

Adjust the time on your camera for daylight saving

If you’re in this part of the world, then daylight savings means the clocks went back an hour last weekend. Your phone adjusted itself, as did some other gadgets, but your oven probably didn’t, and your camera almost certainly didn’t update either.

I couldn’t possibly describe how to fix the time on your camera, but on my Sony A7III I was able to disable “daylight savings time” and the time was corrected. I need to switch it back on next Spring, of course.

If, like me, you forgot to do that on Sunday morning, or even worse, you’re in the USA where they switched a few weeks ago, you can use a handy tool in Lightroom to fix the time on any photos you took. It’s in Metadata->Edit Capture Time… and you can adjust the time on multiple photos at a time.

Good thing too, as I had to adjust the time on several hundred photos.

Of course, if you’ve been travelling to another timezone and forgot to adjust your camera time, you should use “Edit Capture Time” to fix the time on those photos too. Years later, you’ll wonder why photos taken at noon are pitch black, and it wasn’t an eclipse…

Lightroom Classic does not have access to some Standard folders.

I have found a brand new error in Lightroom that doesn’t appear in search engines yet. It started happening after the update today. There are similar error messages reported on the Adobe forums, but not this one.

Unfortunately, the “Learn More” link goes to a URL that quickly changes to https://helpx.adobe.com/lightroom-classic/help/allow-permissions.html which shows a 404!

It appears the entire https://helpx.adobe.com/lightroom-classic/ directory is showing a 404 now. I guess they really do want to get rid of Lightroom Classic.

Anyone know how to fix this one?

Edit: the next morning it looks like Adobe have fixed their site and the documentation above is live!
For unknown reasons, that warning dialogue has gone away. The only major change was updating to macOS 12.5.1. If you see the error, “Lightroom Classic does not have access to some Standard folders.” then hopefully updating macOS will do the trick, but the documentation is now working and suggests going into Systems & Privacy to give Lightroom Classic more access.

Pick your best photos faster

James Popsys explains how he picks the best photos from his shoots. Video is pre-pandemic. It’s refreshing to hear someone mention going out to photograph and not mention social distancing.

  • “In the field” shoot a black image if you see “the one” that works.
  • In Lightroom import your photos immediately. Do not sort and choose when you get home.

He uses stars in Lightroom. In the first round he awards up to three stars:

  • Single star – photo must be interesting and sharp (in the right places)
  • Another star – does the composition work?
  • Another star – is it exposed correctly?

For the second round, he only shows photos that have two stars or more. So that should show photos that are interesting and sharp, and either composition works or exposed correctly. In this round he changes composition by cropping and/or fixes exposure. Should have a few more three star photos.

At this point he’ll do more editing, and the best photos get another star. The very best get five stars.

I’m blogging this because I’ve had this video open in my browser tabs for months, meaning to try out this technique but I learn a process like this better if it’s written down. Hope it helps somebody!

Howto: sync recent photos in Lightroom Classic

Lightroom Classic comes with 20GB of space on Adobe’s cloud service (Lightroom CC/Web/app) but did you know that you can sync photos to the cloud and then edit them on your phone without using that space?

The original photos are not synced, but a smaller cut down smart preview is which in most cases will be indistinguishable from the original.

If you create a collection, all the photos in that collection can be synced with the cloud. They’ll appear as an album of the same name in the Lightroom app on your phone or iPad. They won’t take up any of that valuable 20GB of space. Right-click on the collection and click “Sync with Lightroom”. You can also click the checkbox to the left of the collection name.

Unfortunately Adobe won’t allow you to sync smart collections, and I presume that is intentional for whatever reason. However, with the help of the Any Source plugin you can configure it to sync smart collections with the cloud. This very handy plugin syncs the smart collection with a dumb collection that can then be synchronised.

I use it to synchronise the following smart collections:

  • Published photos.
  • Unpublished photos.
  • Photos on my TODO list.
  • Recent Photos from the last 3 months.

The plugin has a free trial but is PWYW and well worth paying for!

Syncing my recent photos with the cloud is simple.

  • Create a smart collection.
  • Call it “Recent Photos”.
  • Add one rule: “Capture Date” “is in the last” 3 “months”.
  • Save.

That will create your new smart collection. Now follow the instructions to synchronise smart collections on the Any Source homepage. It might take a few minutes for the album to appear in mobile Lightroom but it will eventually.

HOWTO: Square Instagram images with white borders

I noticed that a lot of Instagram users, such as Alan Schaller to name but one, were posting images with thick white borders to make their images into the square images that Instagram favours. I like the striking look these images have in the Instagram gallery.

I wondered for some time about the best way of adding this border and from brief searches there are apps that will add the border but my workflow involves Lightroom so I wanted to integrate the border making into my export process.

I work on a Mac, and already have ImageMagick installed so I knew a little shell scripting would probably go a long way.

A couple of searches later, and I found this page describing how to use ImageMagick to create a floating image within a square canvas without changing the aspect ratio of the image.

Instagram resizes to 1080px wide so by using the following code I could make a rectangular image into a square:

convert -background white -gravity center input.jpg \
     -resize 1080x1080 -extent 1080x1080 result.jpg

Here’s an example from my street photo today. See it on Instagram here.

Once I could do that, the rest was simple. I have a Lightroom export for Instagram images that resizes them and places them in a folder where they are synced automatically with my phone using Syncthing.

Export actions have a “post processing” section where Lightroom can call an external script. I created the following script, made it executable with chmod a+x add_instagram_border.sh and added to Lightroom using “Open in Other Application”.

#!/bin/sh

# Square and add white borders to images.
# https://odd.blog/

for i in "$@"
do
    /usr/local/bin/convert -background white -gravity \
        center "$i" -resize 1080x1080 -extent 1080x1080 \
        /tmp/out.jpg
    mv /tmp/out.jpg "$i"
    open "~/Sync/Instagram"
done

The script goes through the exported images from Lightroom, adding borders to them, and then at the end opens the folder in Finder for review.

Hopefully this will be useful to someone else. If you add borders to your images, how do you do it?