Lua script to refresh EXIF

I created a LUA script to modify the EXIF data in an image with manual lens information. It works fine, but after running I need to manually press “refresh EXIF” in actions on selection Metadata. How can I run this same action but from Lua?

1 Like

How are you modifying the EXIF data? Hopefully you’re not altering your RAW file. You can alter the EXIF information in the database, without affecting your RAW file, using a LUA script.

Currently I am changing the RAW files. I tried to alter the dt database directly but could not make it work. Do you have a sample code that can guide me?

Here’s a script that I used to correct lens information reported as numbers.

correct_lens.zip (4.5 KB)

1 Like