How can I migrate Picasa face tags to digiKam without changing image file hashes?

Asked 8/10/2022

12 views

2 answers

0

I’m moving an image library from Picasa 3.9 to digiKam and want to preserve face tags. Picasa’s “Write faces to XMP” appears to modify the image files themselves, which changes their SHA256 hashes. I’d prefer to keep the original files unchanged because I use hashes for deduplication and may re-download some images later. My library includes JPEG, PNG, and WebP files, and I’d like a cross-platform approach that works on Windows and Linux. Is there a way to transfer or store face metadata without altering the image files?

Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0

Photography Stack Exchange contributor

3y ago

2 Answers

2

From your comments I understand you currently have an image library in Picasa, with photos which might become duplicated in the future (due to re-downloading). To ease the deduplication process you want to have a "static" hash for each photo, even when you update the metadata of the photo.
You're looking to move away from Picasa to a cross-platform solution, which digiKamoffers.

Below information is pieced together from the internet, I haven't tried anything, but from the descriptions it seems it will do what you want. Make a backup before trying anything.

Getting face tags from Picasa to digiKam

When you do a websearch for "digikam face tag import" you'll find a few methods that relate to Picasa:

  • This gist exports the face tags from Picasa to the digiKam database directly, without touching any photos.
  • picasa2digikam which is "A script to migrate Picasa metadata from its .picasa.ini files and/or contacts.xml file to the digiKam database."

Using any of the two methods above you should be able to get the face tagging out of Picasa and into digiKam.

Writing metadata, but without changing the photo file

Now you have a digiKam database that indicates the face tagging information for all your photos. From your comment it seems you don't want to be tied to any software, so you probably want to look into XMP sidecar files.

Those files live next to the photo files and hold the metadata, such as the face tags. digiKam has support for writing metadata to sidecar files:

In digiKam’s main window go to Settings -> Configure digiKam and select the tab Metadata There are four options available:

  • Write to image only — This option will not use XMP but will write all the metadata directly into the images.
  • Write to XMP sidecar only — No metadata will be written to any images directly but it will write all metadata into a separate XMP file in the same directory as the image.
  • Write to image and XMP sidecar – metadata will be written to both XMP and Image.
  • Write to XMP sidecar for Read-only images only — which means that images which have read, write and execute permissions metadata will be written directly to the image whereas for Read–only images XMP sidecar will be used.

To be safe you could make all your photos read only, and then choose option 4 (or simply choose option 2).

Now you should have all your images in a folder, where each image has a corresponding .xmp file with the face tagging information. I think this is as "universal" as it gets.

Originally by user9161. Source · Licensed CC BY-SA 4.0

user9161

3y ago

0

AI Answer

Generated from our catalog & community — verify before relying on it.

Yes. If you need the image file’s SHA256 to stay unchanged, don’t write metadata into the image itself. Any embedded metadata update in JPG/PNG/WebP will change the file hash.

The usual solution is to use XMP sidecar files: a separate .xmp file alongside each image that stores metadata such as tags and face regions without modifying the original image. This is already common practice for RAW files, and digiKam may support or be configurable to use sidecars more broadly. Check digiKam’s metadata settings and prefer sidecar-based writing if available.

For migration from Picasa, there are community methods/scripts that export Picasa face tags into digiKam’s database or XMP-related metadata, but you should back up first before trying any conversion.

Also, for deduplication, remember that file hashes detect exact file identity, while photo managers like digiKam can also find duplicates using perceptual/image hashing, which can help even if metadata differs.

So the practical path is: keep originals untouched, store face metadata in sidecars or import into digiKam’s database, and use digiKam’s duplicate-search tools where exact SHA256 matching isn’t enough.

UniqueBot

AI

3y ago

Your Answer