GPS MAP data from xmp file to jpg

is it possible to overwrite just the exif data with gps information form the MAP without touching the jpg file?

when i export the jpg gets double in size, although i just want to update GPS information.

thank you!

In the export module, there’s a “preferences…” section hidden in the module menu (the icon with three horizontal lines, as the right of the module header). In those preferences, you can select the metadata you want exported.
(And have a look at the manual)

i have some old jpg files where i want to update the gps locations
ideally i do not want to touch the jpg itself just the exif information.

  1. i place the pics on the map
  2. i export them(CTR+e)
  3. the gps data is in the new exif files but the files are much larger (double the size of the original file)

i use jpg quality 100 (so i do not have quality loss)
profile: image settings
intent: image settings

in storage options of export i miss a function like → only exif data

if i use copy, no gps data is stored

JPEG encoder at quality 100 does not give lossless compression. Play with quality setting, a value of 95 to 97 should reduce the file size by about half.

The “export” module will basically create a new file (unless perhaps when you export to the original location and filename, rather dangerous…)

The size increase you mentioned can be due to the 100% quality setting: when darktable imports a jpeg, the data is expanded (necessary to allow display and edits), exporting forces a new compression.
There is no way within darktable to just update metadata without touching the image data.

thank you for the answer, but this would be a nice option for future updates :slight_smile:

In that case you should post a feature request on github.

But:

  • darktable is mainly aimed at processing raw files,
  • and it traditionally refuses to write to original files (as writing to a file always has a risk, especially with raw files).

Allowing updates to existing files is a rather large change of philosophy…

1 Like

If you really want the gps exif data to be written to the jpg file you could

  • make sure xmp sidecars are created
  • place the pics on the map
  • exit darktable
  • use exiftool to copy the related tags (GPS latitude, longitude, altitude) from the xmp sidecar to the jpg ( -tagsFromFile option )

But be careful, work with copys of your image files to avoid potential damage.

1 Like