Bug 498816 - HEIC not showing in album - green icon displayed instead
Summary: HEIC not showing in album - green icon displayed instead
Status: REPORTED
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-DImg-HEIF (other bugs)
Version First Reported In: 8.5.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-01-17 19:36 UTC by Caro
Modified: 2025-06-24 13:24 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Caro 2025-01-17 19:36:03 UTC
SUMMARY
I have one HEIC picture, from iPhone 16, displaying as green file icon - while others (same phone and taken on the same day) are showing fine. If trying to display the picture, the picture frame remains empty, and the message "Failed to load image" is displayed.

The image is properly displayed in Windows Explorer, and can be open with any other software.

STEPS TO REPRODUCE
1. In Windows, move the picture file to an album folder
2. In Digikam, Navigate to the album
3. The green file icon shows up

Image: https://we.tl/t-i1lbj23yiM

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 10

ADDITIONAL INFORMATION
Image to reproduce: https://we.tl/t-i1lbj23yiM
Comment 1 Maik Qualmann 2025-01-17 21:28:29 UTC
The error message from libheif is:

digikam.dimg.heif: Error while processing HEIF image: Invalid input: No 'hvcC' box
digikam.dimg.heif: Error: Could not read source file.

It cannot be read by any program under Linux (darktable or others)

In other projects, corresponding bug reports are closed because it is a corrupt HEIF image, the cause of which probably lies in IOS.

Maik
Comment 2 Caro 2025-01-19 15:36:15 UTC
Hi Maik,

Thanks for checking ! Microsoft Photoscan open it. So the image doesn't really seem "corrupted" - though indeed it may miss some specific information.

If the issue can't be handled in Digikam, do you have an idea how I could repair the picture, so it can load in Digikam ?

Thanks for your help !

Nice day,

C
Comment 3 Maik Qualmann 2025-01-19 15:44:58 UTC
Maybe the Microsoft HEIF loader is a bit more error-tolerant. Also check if the error occurred during the transfer from the iPhone. Otherwise you have to report the problem to the libheif team along with the affected image.

https://github.com/strukturag/libheif/issues

We in digiKam already load HEIF images with the tolerant option and not with the strict decoding option, so the problem cannot be handled by libheif at the moment.

Maik
Comment 4 Maik Qualmann 2025-03-03 20:18:09 UTC
This is the corresponding bug report at libheif. It looks more like corrupted images from the iPhone.
The last comment is interesting.

https://github.com/strukturag/libheif/issues/1448

Maik
Comment 5 caulier.gilles 2025-04-11 18:13:32 UTC
Hi,

The 8.7.0 pre-release Windows installer from today have been rebuilt from
scratch with Qt 6.8.3, KDE 6.12, OpenCV 4.11 + CUDA support, Exiv2 0.28.5, ExifTool 13.27, ffmpeg 7, all image codecs updated to last version (jxl, avif, heif, aom, etc.).

Please try with this version to see if your problem still reproducible...

https://files.kde.org/digikam/

Thanks in advance
Best regards

Gilles Caulier
Comment 6 Caro 2025-05-18 07:47:34 UTC
Hi Gilles, 

Sorry for delayed follow-up, it has been busy times ! 

Interesting is: I never had any of those with my previous iPhone, but with my iPhone 16, I get more and more of those pictures, that show up perfectly on my phone, perfectly in Windows tools, but show as corrupted in some tools (digikam, Gimp, ....).
I searched the web for an explanation to this, and could not find any solid information.... I wonder what is happening there.

Unfortunately, the image still show the same in Digikam 8.7.0: green thumbnail and error message when opening.

Let me know if any test I can do on my side to help,

Kind regards,

C
Comment 7 Maik Qualmann 2025-05-18 10:27:44 UTC
As I said, the source of the problem lies with libheif and we at digiKam can't do anything about it.

https://github.com/strukturag/libheif/issues/1448

Maik
Comment 8 caulier.gilles 2025-05-18 14:00:52 UTC
This is due to the new HDR features add by Apple to the HEIC format with the iphone 16 (and the IOS relevant). As MAik comment, a upstream libheif issue exists about it and must be solve to close this report.

Gilles Caulier
Comment 9 Maik Qualmann 2025-05-18 18:30:24 UTC
According to the libheif bug report, it was an Apple bug that has since been fixed. It will no longer affect current images.

Maik
Comment 10 Caro 2025-06-24 13:11:24 UTC
Hi Gilles, Maik,

Thanks for your feedbacks.

@Maik: I tested following the message from Gilles, on 11.04.2025-18:15. 

I feel somehow confused, I am not sure anymore if something been changed in Digikam to allow for the display of the "corrupted" pictures...
I have tested with the last pre-release, and the images still don't show up, while they properly display on my phone, and in Windows image.

If it wouldn't be possible to change the libheif in Digikam, do you have an idea how to "clean-up" those images, so they display properly in Digikam ? I feel it must be possible to retrieve something, since I can see them using other tools.

Thank you very much in advance for your feedback !

Kind regards,

C
Comment 11 caulier.gilles 2025-06-24 13:24:24 UTC
Hi Caro,

The problem still open in libheif. Se this report :

https://github.com/strukturag/libheif/issues/1448

Until this file is closed, the problem will remain, excepted if Apple Ios fix the problem with the new photo taken with the phone.

Best Regards

Gilles Caulier