Skip to main content
Participant
Mar 12, 2024 10:00 PM UTC
Question

Is it possible to create a program that applies XMP files to photos programmatically using Lightroom

Hello,

Is it possible to create a program that applies XMP files to photos programmatically using Lightroom Classic SDK?

 

I want to change the photo visually, not just change the photo's meta data.

7 replies

Participant
Feb 16, 2025 2:51 PM UTC
Hi, I'd like to ask if you have solved this problem now. I'm also stuck with it.
Translate
johnrellis
Legend
Mar 13, 2024 1:53 AM UTC

"Is it possible to create a program that applies XMP files to photos programmatically using Lightroom Classic SDK?"

 

Yes. An outline of the steps:

 

1. Use LrXML to parse the XMP file.

 

2. Extract from the parse tree the develop settings to be changed and store them in a Lua table, as described by LrPhoto photo:getDevleopSettings().

 

3. Import the photo(s) to be changed into the current catalog using LrCatalog catalog:addPhoto().

 

4. Apply the develop settings from step 2 to the photos using photo:applyDevelopSettings().

 

5. Export the photos to your desired format using LrExportSession.

 

There are a lot of details left unstated here, of course. And there's a steep learning curve to learning Lua and the SDK, unfortunately.

Translate
Participant
Mar 20, 2024 4:47 PM UTC

Thank you for your reply.

Could you recommend a developer or company who can develop what you mentioned?

Translate
johnrellis
Legend
Mar 20, 2024 9:12 PM UTC

I'm periodically asked that, and unfortunately, I don't know any developers that still provide contract LR plugin development. 

Translate
Sean McCormack
Community Expert
Community Expert
Mar 12, 2024 10:13 PM UTC

Visual changes are down via Metadata with Lightroom. If you want permanent changes without metadata, you need to use Photoshop. 

If you're just looking for an edited look with all faders zero'd, then create a profile using settings via Camera Raw and apply a profile. 

I've made a few plugins, but not applying settings, but most that I've seen show a history step. 

 

What's your reasoning with not changing XMP? 

 

 

Translate
Sean McCormack. Author of 'Essential Development 3'. Magazine Writer. Former Official Fuji X-Photographer.
Participant
Mar 12, 2024 10:22 PM UTC

I'm endeavoring to develop a Python program that fulfills the following requirements:

When users upload XMP files and photos, the program will automatically read the XMP files and apply filter effects to the photos without using Photoshop or Lightroom.

I found the Lightroom API on the Adobe site to accomplish the aforementioned task. However, Adobe responded that it is only available for enterprise users with ETLA contracts.

Consequently, I am curious about whether it is possible to create a program like the one described above using the Lightroom ADK, which is available to general users.

Translate
Conrad_C
Community Expert
Community Expert
Mar 13, 2024 12:30 AM UTC

I use an application called LRTimelapse that works similarly. It can read Develop metadata from XMP files written by Lightroom/Camera Raw, modify the values, and write them back out to the XMP files in a way that Lightroom Classic will apply when it reads the XMP files. In this way, LRTimelapse is able to change Develop settings values (to achieve customized time lapse ramping) in a way that Lightroom Classic cannot do itself.

 

You might want to contact the developer of LRTimelapse to ask how they are able to do it with the SDK. I do not know them personally, but it seems like a small developer who might even be just one person.

Translate