Bug 497996

Summary: NEF file not added to database
Product: [Applications] kphotoalbum Reporter: Franz Graf <franz.graf>
Component: generalAssignee: KPhotoAlbum Bugs <kphotoalbum-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: franz.graf, johannes, tl
Priority: NOR    
Version First Reported In: 6.0.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Franz Graf 2024-12-28 19:04:24 UTC
SUMMARY
NEF file not added to database.

STEPS TO REPRODUCE
1. From konsole start kphotoalbum and choose the demo database.
2. Paste a NEF File to the demo directory.
3. Maintenance - Rescan for Images and Videos, then Refresh and Save.

OBSERVED RESULT
NEF file is not added to the database (checked after Save in index.xml file) and not shown in thumbnail view.

EXPECTED RESULT
NEF file is added to the database and shown in thumbnail view.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 6.2.4
KDE Frameworks Version: 6.9.0
Qt Version: 6.8.1
Kernel Version: 6.12.1-arch1-Watanare-T2-1-t2 (64-bit)
Graphics Platform: Wayland

ADDITIONAL INFORMATION
If a JPG file is copied to the demo directory, it gets added to the database and displayed in viewer as expected.
NEF files are displayed in gwenview and geeqie.
All dependencies of kphotoalbum (from pacman -Qi) are installed.
Comment 1 Franz Graf 2024-12-29 17:04:45 UTC
Additional information:
After downgrading to kphotoalbum-5.13.0, marble-common-24.08.3, and marble-24.08.3, NEF files are added to the database and show in viewer.
Comment 2 Tobias Leupold 2024-12-30 13:25:04 UTC
Hi, thanks for your bug reports! Would you mind to provide an example NEF file? I don't use or have RAW photos, so I can't test it …
Comment 3 Franz Graf 2024-12-30 17:36:49 UTC
Thanks for looking into this. Here one NEF:
https://drive.google.com/file/d/1-koDMB9jADvue-d_zu6uVN8GSdXay9kU/view?usp=sharing
Comment 4 Tobias Leupold 2024-12-30 19:04:08 UTC
Okay. Qt itself can actually process this type of image (I tried it with KGeoTag, which doesn't use a raw image library, but only Qt functionality, and I could open your file).

The problem is that currently, KPhotoAlbum doesn't classify this file as readable.

Whilst searching for new images, two checks are done: 1. If QImageReader lists the MIME type and if not 2. if one of our decoders can read it.

The MIME type is "image/x-nikon-nef" in your case. This is not directly listed in QImageReader::supportedMimeTypes(), but it also wasn't for KPA 5. The difference is that KPA 5 stated it would be still decodeable (calling ImageManager::ImageDecoder::mightDecode), but KPA 6 doesn't anymore.

This needs a closer inspection …
Comment 5 Johannes Zarl-Zierl 2025-10-20 10:08:25 UTC
Git commit eef069151b4aef0d216cb57fe257afba24a8737b by Johannes Zarl-Zierl.
Committed on 20/10/2025 at 10:07.
Pushed by johanneszarl into branch 'master'.

Fix detection of libkdcraw

There was a typo preventing usage of KDcraw even if it was correctly
found at configure time.

M  +1    -0    CHANGELOG.md
M  +1    -1    lib/CMakeLists.txt

https://invent.kde.org/graphics/kphotoalbum/-/commit/eef069151b4aef0d216cb57fe257afba24a8737b
Comment 6 Johannes Zarl-Zierl 2025-10-20 10:09:54 UTC
Hi!
Are you able to check with the latest kphotoalbum version from git? I believe the issue should be fixed now...
Cheers,
  Johannes
Comment 7 Franz Graf 2025-10-20 19:30:36 UTC
I installed the git version and it behaves as expected. The added NEF file is added to the database.
Thank you!
Comment 8 Johannes Zarl-Zierl 2025-10-20 19:56:39 UTC
Thanks for taking the time to confirm!