Import from iPhoto albums

dk at ballen.fastmail.fm dk at ballen.fastmail.fm
Fri Oct 17 01:15:37 BST 2025


I second the osxphotos suggestion. It works well and has great 
documentation.

On 10/16/25 7:15 PM, Carol C. Kankelborg wrote:
> I forgot to reply to the whole group when I sent this directly to 
> Thierry Merle. It may benefit someone else as well. I used osxphotos — 
> it is amazingly powerful.
>
> Here is my notes for the process of exporting photos from iPhoto to 
> DigiKam. I did this process back in May this year. I am still running 
> Sonoma (14.7.8). iPhoto is a 32-bit app, so it doesn’t run on its own 
> past Catalina (I think). There is an app called Retrospective that 
> fixes the 32-bit libraries so that iPhoto will run (sort of) past 
> that. But that app is not being updated to run on later MacOS than 
> Sonoma.
>
> If you have any questions, I’ll do my best to answer them. Skimming 
> what I documented, I hope my notes are good enough for you to follow.
> One thing I didn’t mention was that on many imported photos that had 
> faces recognized, the face box had shifted downward in the process. In 
> DigiKam, the box is there, correctly labeled, but lower, such as at 
> chest level. I haven’t explored an efficient process to fix that, 
> whether by delete & re-recognize or move the box.
>
> Good luck.
>
> Here is my experience.
>
> Useful information for exporting Photos to Digikam
>
> Tools:
> homebrew as package manager.
>
> brew update
> brew upgrade
> # https://github.com/astral-sh/uv
> brew install uv # (a python package manager)
> # https://exiftool.org
> brew install exiftool # (used by osxphotos to export metadata)
>
> # Install osxphotos:
> # https://rhettbull.github.io/osxphotos/ (Documentation)
> uv tool install --python 3.13 osxphotos
> uv tool upgrade osxphotos
>
> # Fix permissions in iPhoto library
> # From osxphotos email list, Rhett Turnbull. (3/21/2025)
> # "$(id -un)":"$(id -gn)" would automatically insert your user id and 
> group.
> # The photo library should have read/write access by you and be owned 
> by you.
>
> sudo chown -R "$(id -un)":"$(id -gn)" <photolibrary filename>
>
>
> # Create directory you will export images into
> mkdir <dirname>
>
> Export Files:
> # Puts in directory based on year and merges exif info with file.
> # Title, Caption, and keyword are visible in Digikam.
> # osxphotos keeps track of what photos have been
> #         exported in a .db file in the export directory
> # The export directory has to exist. osxphotos will not create it.
> # It preserves the original image format.
> # Movies (.mov) and live images (.heic + .mov) are exported.
> Dry Run option:
> # Useful to test out what will be exported
> osxphotos export /path/to/export --dry-run export.csv
>
> ***For Dad's iPhoto library***
>
> Reference Source: 
> https://www.herzbube.ch/blog/2018/11/migrating-iphoto-digikam/ (by 
> PatPatrick Näf Moser)
> However, this is rather old and now that osxphotos exists, there is no 
> need to write an apple script. Also, iPhotos was still fully 
> functional for the author, whereas today iPhoto running on Retroactive 
> on MacOS Sonoma, 14.7.4 is severely hamstrung and will freeze with 
> annoying frequency.
>
> His third point under Migration Step 1 seems to be something I have 
> encountered. In the dry-run, there are 2050 images that could not be 
> exported. The one I investigated more closely was pre-2011. The edited 
> version could not be found, but the original existed. Interestingly, 
> in the iPhoto library, the one osxphotos could not find was under the 
> "Preview" file structure while the one it did find was under "Masters."
>
> His process was to use an AppleScript to export images, with metadata 
> in a separate file, organized by album name and keeping both original 
> and modified files. The script exhausted system resources so he had to 
> process subsets of albums at one time over several iterations. He then 
> had to configure DigiKam to read sidecar files.
>
> Problems encountered that required post-processing: Converting his 
> metadata files to .xmp format and adding file extensions to files that 
> lacked them. He also decided to only keep the latest version of each 
> image.
>
> After importing, he had more clean-up to do.
> + There were "useless technical JPEG comments" such as "AppleMark," 
> camera names, GIMP, and empty spaces. He did this via the SQL database.
> + Titles and comments needed encoding fixed. He did this manually, but 
> used DQL to find a list of all image comments so he could find them 
> easily. NOTE: I tried the caption " très ça c’est bon. güt." and it 
> was imported correctly into DigiKam.
> + Final step: Write metadata to image file, not leave it solely in the 
> database.
> - In Preferences, change Metadata-> Behavior so that tags, captions, 
> title, and rating are checked. Also, consider not updating file 
> timestamp when files are modified.
> - In the Menu Tools -> Maintenance, select "Sync Metadata and 
> Database." Choose Database -> Image metadata.
>
> My Experience:
> Running osxphotos on 17,560 images (up through Dec. 31, 2010) took 
> 8m47s. 17,462 photos were imported and 978 photos were missing. 
> osxphotos-dad directory was 43.96GB. Importing them into DigiKam took 
> under 2 mins. However after that, the computer is getting pretty warm 
> as DigiKam is presumably analyzing and categorizing the photos.
> It handles nested photo albums but not smart albums.
>
>
>
> Add this in for a dry run: --dry-run --verbose
>
> # For limited date range
> *** {/Users/cckborg/Pictures} ***
> Shalom-cckborg $ osxphotos export osxphotos-dad/ --from-date 
> "2009-09-19" --to-date "2009-09-21" --jpeg-ext jpg --exiftool 
> --keyword-template "osxphotos-{today}" --keyword-template 
> "iPhotoALB-{folder_album_project(>),No Album}" --keyword-template 
> "TYPE-{media_type}" --keyword-template "LOC-{place.name.country}" 
> --keyword-template "CAM-{exif.camera_model,NoCamera}" --strip 
> --touch-file --report "export_{today}.csv" --directory 
> "{created.year}" --library ./Dad\ iPhoto\ Library.photolibrary
>
> # For specific photo
>
> *** {/Users/cckborg/Pictures} ***
> Shalom-cckborg $ osxphotos export osxphotos-dad-iPhoto/ --name 
> P8270121.JPG --jpeg-ext jpg --exiftool --keyword-template 
> "osxphotos-{today}" --keyword-template 
> "iPhotoALB-{folder_album_project(>),No Album}" --keyword-template 
> "TYPE-{media_type}" --keyword-template "LOC-{place.name.country}" 
> --keyword-template "CAM-{exif.camera_model,NoCamera}" --strip 
> --touch-file --report "export_{today}.csv" --directory 
> "{created.year}" --library ./Archived\ Photo\ Collections/Dad\ iPhoto\ 
> Library.photolibrary
>
> # To clear out db in export folder.
>
> # For the whole library (except some added by Mom)
> # Results:
> ### Processed: 26368 photos, exported: 25849, missing: 2050, error: 0, 
> touched date: 0
> ### Elapsed time: 0:13:20
> ### 540 missing that were not edited (original not preserved by iPhoto)
>
> *** {/Users/cckborg/Pictures} ***
> Shalom-cckborg $ osxphotos export osxphotos-dad/ --to-date 
> "2015-01-23" --jpeg-ext jpg --exiftool --keyword-template 
> "osxphotos-{today}" --keyword-template 
> "iPhotoALB-{folder_album_project(>),No Album}" --keyword-template 
> "TYPE-{media_type}" --keyword-template "LOC-{place.name.country}" 
> --keyword-template "CAM-{exif.camera_model,NoCamera}" --strip 
> --touch-file --report "export_{today}.csv" --directory 
> "{created.year}" --library ./Dad\ iPhoto\ Library.photolibrary --dry-run
>
> #  (Mom's Photos) in the iPhoto library
> # Results:
> ### Processed: 144 photos, exported: 144, missing: 0, error: 32, 
> touched date: 144
> ### Elapsed time: 0:00:04
>
> *** {/Users/cckborg/Pictures} ***
> Shalom-cckborg $ osxphotos export osxphotos-mom-2/ --from-date 
> "2015-01-24" --jpeg-ext jpg --exiftool --keyword-template 
> "osxphotos-{today}" --keyword-template 
> "iPhotoALB-{folder_album_project(>),No Album}" --keyword-template 
> "TYPE-{media_type}" --keyword-template "LOC-{place.name.country}" 
> --keyword-template "CAM-{exif.camera_model,NoCamera}" --strip 
> --touch-file --report "export_{today}.csv" --directory 
> "{created.year}" --library ./Dad\ iPhoto\ Library.photolibrary --dry-run
>
>
> ***For Carol's iPhoto library***
> # For the whole library
> # Results:
> ### Processed: 60054 photos, exported: 60438, missing: 81, error: 770, 
> touched date: 60436
> ### Elapsed time: 0:36:41
> ### Destination size = 44.41GB. iphotolibrary size = 264.25 GB
> ### 60,511 items minus 73 folders = 60,438 photos
> ### 60,519 entries in report. Includes 8 .mov files that froze osxphotos.
> ### 81 missing: 8 .mov problems; 1 add'l .mov; 1 not edited; the rest 
> edited.
> ### 14,319 exiftool warnings
> ### 769 osxphotos errors
> ### 771 exiftool errors
>
> ### 249 Unsupported file type for exiftool: pict, pct, bmp, AVI. 3 
> with no extension.
> ### 1   Extension HEIC, but jpg file --> renamed. 2020/IMG_4023 (1).jpg
> ### 14,075 errors and warnings. Took about 2 hours to fix.
>
>
> *** {/Users/cckborg/Pictures} ***
> Shalom-cckborg $ osxphotos export osxphotos-carol-iPhoto/ --jpeg-ext 
> jpg --exiftool --keyword-template "osxphotos-{today}" 
> --keyword-template "iPhotoALB-{folder_album_project(>),No Album}" 
> --keyword-template "TYPE-{media_type}" --keyword-template 
> "LOC-{place.name.country}" --keyword-template 
> "CAM-{exif.camera_model,NoCamera}" --keyword-template "PROJ-{project}" 
> --strip --touch-file --report "osxphotos-carol-{today}.csv" 
> --directory "{created.year}" --library ./My\ iPhoto\ 
> Library.photolibrary --dry-run
>
>
>
>
> ==> For errors where file extension did not match file type, fix those.
>
> ==> Then run fix-exifdata-dadiphoto (pipe output to log file)
>
> 1. Set up filters to select any error, exif-error or exif-warning. 
> Eliminate the "unsupported type" (e.g. PICT, AVI, BMP) and "not valid" 
> (mismatch between extension and file type).
> 2. Copy column of file names with paths into text document (e.g. in 
> BBEdit).
> 3. Put double quotation marks around each file name. Use Find/Replace 
> (Grep, Show matches)
> ^/Users => "/Users"
> \.(\w*)$ => .\1"
> 4. Add in the other code to run fix-exifdata script.
> 4a. I recommend testing out the script on a few files in a test area 
> first to convince yourself it is working correctly before running it 
> on several thousand files.
> 5. Run Script, sending output to a log file.
> bash fix-exifdata-caroliphoto 2>&1 | tee -a fix-exifdata-caroliphoto.log
> 6. Examine the log to ensure problems have been fixed to your 
> satisfaction.
>
>
> Examine warnings and errors. They all turned out to be inconsequential 
> (for my purposes).
> Import each year folder into DigiKam. If you select the parent album 
> in the left sidebar, then you don't have to keep selecting the right 
> one. If there are a lot of files in a given year, it may take a while 
> for the folder to show up in the sidebar. DigiKam will warn you if you 
> try to import a given year twice.
> Make sure you have enough disk space to have 3+ copies of your images: 
> iPhoto library, osxphoto export, original versions of files exiftool 
> changed, DigiKam library.
>
> Note, the "check mark" keyword is not correctly rendered. You will get 
> an error that there are non-Latin characters.
>
> To avoid memory usage issues, I imported each folder separately.
>
> ==> Manually evaluate errors from log file. (For Dad's iPhoto album, I 
> found all of them to have been resolved satisfactorily.)
> Hint: Search for ^>.*minor or ^>.*Warn or ^>.*error for errors or 
> warnings in updated files.
>
>
> ==> Evaluate missing photos from osxphotos report file. (For Dad's 
> iPhoto album, I found most of them were missing originals in the 
> database. Only 2 actually existed. For those missing originals, it 
> seems like they were copies from Dad's iPod or used in projects such 
> as slide shows. There do seem to be a number of missing captions in 
> the 2010 photos. I still need to investigate that.) For Carol’s iPhoto 
> album, there were a few that I had to manually export from iPhoto. 
> Most, though were either missing or a problem related to edited vs. 
> original.
>
>
> ==> Next stage
> Generate fingerprints, under Similarity. Eliminate duplicates.
> Scan for faces. Recognize faces.
> Some photos were imported with Confirmed face of _UNKNOWN_. I had to 
> select all, then move into the true "unknown" category and 
> re-recognized them.
> People can be combined by selecting photos under one name and dragging 
> into the correct name.
> Auto-tag. Save this for last, after you've culled your collection. 
> This is a time consuming step.
>
>
>
>> On Oct 15, 2025, at 09:32, Bill Allen <ballen at fastmail.fm> wrote:
>>
>> But, you explicitly say it's no longer supported and recommend: 
>> https://github.com/RhetTbull/osxphotos.
>>
>> On 10/15/25 10:18 AM, Jens Benecke wrote:
>>> Hello,
>>>
>>> you can try this tool: https://github.com/jensb/iphoto2xmp
>>> Disclaimer: I wrote it.  🙂
>>>
>>> Jens
>>>
>>>
>>> Am 15.10.25 um 11:22 schrieb Thierry Merle:
>>>> I have "inherited" a MacBook and CDs with iPhoto albums, with 
>>>> apparently metadata in separate database folders (iPhotoMain, 
>>>> iPhotoAux, Library.data and Library.iPhoto) I can't read from windows.
>>>>
>>>> I'm not familiar with apple tools.
>>>>
>>>> Is there a way, on my PC or on the macbook to transfer the photos 
>>>> to my digiKam folder without losing the metadata ?
>>>>
>>>> Thanks
>>>>
>>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/digikam-users/attachments/20251016/88dd20ef/attachment-0001.htm>


More information about the Digikam-users mailing list