SUMMARY *** NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols. See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports *** STEPS TO REPRODUCE 1. create a Album called TEST 2. refresh and import HEIC pictures - all works fine, thumbnails and able to view picture 3. rename Album TEST to TESTä (or any other Swedish character å, ä, ö) OBSERVED RESULT with the new name of TEST Album (with swedish character) thumbnails are shown, but it's not possible to view the picture, "failed to load image" is shown. Note: the TEST name for Album is just an example. As soon as there are "å,ä,ö" in the path for the file, it is not possible to view the picture itself. from DebugView: [5384] digikam.dimg.heif: Error: Could not read source file. [5384] digikam.dimg: "S:/SORTERADE/testä/2021-08-12 10-31-54 iPhone 11 Pro.heic" : Cannot load file !!! for some reason iPhone 6 HEIC files seems to work, but iPhone 7, 11 does not. EXPECTED RESULT possibel to view thumbnails and pictures SOFTWARE/OS VERSIONS Windows: 10 macOS: Linux/KDE Plasma: (available in About System) KDE Plasma Version: KDE Frameworks Version: 5.96.0 Qt Version: 5.15.5 ADDITIONAL INFORMATION
The cause is not the path. Unfortunately, compared to digiKam-7.6.0, we are currently using an older libheif and not the current git/master version. Therefore, some libheif files cannot be loaded. Maik
See Bug 456688 Maik
Can you please activate internal debugging in the digiKam settings under Miscellaneous-> System and post the full debug output after a restart if you try to open a HEIF file in a path with special characters. Maik
hi, and thanks for such a quick answer. As long as I don't use special characters everything is working great so I'm not sure it's the same as 456688? anyway, could you please advice where the output of debug log is on a windows machine, and I'll post it right away.
ok, oc it was in DebugView.. - first i open the file with the Album named "test" - then renamed "test" Album to "testö" [23380] digikam.dimg: "S:/SORTERADE/test/2021-08-12 11-50-14 iPhone 11 Pro.heic" : "HEIF" file identified [23380] digikam.metaengine: Loading metadata with "Exiv2" backend from "S:/SORTERADE/test/2021-08-12 11-50-14 iPhone 11 Pro.heic" [23380] digikam.dimg.heif: HEIF color profile found with size: 548 [23380] digikam.dimg.heif: HEIF image size: ( 3024 x 4032 ) [23380] digikam.dimg.heif: Decoded HEIF image properties: size( 4032 x 3024 ), Alpha: false , Color depth : 8 [23380] digikam.dimg.heif: HEIF data container: 0x183f84bc040 [23380] digikam.dimg.heif: HEIC bytes per line: 12096 [23380] digikam.dimg.heif: Color bytes depth: 8 [23380] digikam.dimg.heif: Color multiplier: 1 [23380] digikam.general: Try to get preview from "S:/SORTERADE/test/2021-08-12 10-31-54 iPhone 11 Pro.heic" [23380] digikam.general: Preview quality: 0 [23380] digikam.metaengine: Loading metadata with "Exiv2" backend from "S:/SORTERADE/test/2021-08-12 10-31-54 iPhone 11 Pro.heic" [23380] digikam.general: Try to load DImg preview from: "S:/SORTERADE/test/2021-08-12 10-31-54 iPhone 11 Pro.heic" [23380] digikam.dimg: "S:/SORTERADE/test/2021-08-12 10-31-54 iPhone 11 Pro.heic" : "HEIF" file identified [23380] digikam.metaengine: Loading metadata with "Exiv2" backend from "S:/SORTERADE/test/2021-08-12 10-31-54 iPhone 11 Pro.heic" [23380] digikam.dimg.heif: HEIF color profile found with size: 548 [23380] digikam.dimg.heif: HEIF preview found in thumbnail chunk [23380] digikam.dimg.heif: HEIF image size: ( 240 x 320 ) [23380] digikam.dimg.heif: Decoded HEIF image properties: size( 320 x 240 ), Alpha: false , Color depth : 8 [23380] digikam.dimg.heif: HEIF data container: 0x183f0b11590 [23380] digikam.dimg.heif: HEIC bytes per line: 960 [23380] digikam.dimg.heif: Color bytes depth: 8 [23380] digikam.dimg.heif: Color multiplier: 1 [23380] digikam.dimg: "S:/SORTERADE/test/2021-08-12 10-31-54 iPhone 11 Pro.heic" : "HEIF" file identified [23380] digikam.metaengine: Loading metadata with "Exiv2" backend from "S:/SORTERADE/test/2021-08-12 10-31-54 iPhone 11 Pro.heic" [23380] digikam.dimg.heif: HEIF color profile found with size: 548 [23380] digikam.dimg.heif: HEIF image size: ( 3024 x 4032 ) [23380] digikam.dimg.heif: Decoded HEIF image properties: size( 4032 x 3024 ), Alpha: false , Color depth : 8 [23380] digikam.dimg.heif: HEIF data container: 0x183f84b1040 [23380] digikam.dimg.heif: HEIC bytes per line: 12096 [23380] digikam.dimg.heif: Color bytes depth: 8 [23380] digikam.dimg.heif: Color multiplier: 1 [23380] digikam.geoiface: ---- [23380] digikam.general: Stacked View Mode : 0 [23380] digikam.geoiface: ---- [23380] digikam.metaengine: ExifTool "Load Metadata" "-json -G:0:1:2:4:6 -l S:\\SORTERADE\\test\\2021-08-12 10-32-09 iPhone 11 Pro.heic" [23380] digikam.metaengine: Loading metadata with "Exiv2" backend from "S:/SORTERADE/test/2021-08-12 10-32-09 iPhone 11 Pro.heic" [23380] digikam.general: Metadata loading with Exiv2 took 14 ms ( true ) [23380] digikam.general: "Standard Exif Tags" decoding took 0 ms ( false ) [23380] digikam.general: "MakerNote Exif Tags" decoding took 0 ms ( false ) [23380] digikam.general: "IPTC Records" decoding took 0 ms ( true ) [23380] digikam.general: "XMP Schema" decoding took 0 ms ( true ) [23380] digikam.metaengine: ExifToolProcess::readOutput(): ExifTool command completed [23380] digikam.metaengine: ExifTool complete command for action "Load Metadata" with elasped time (ms): 95 [23380] digikam.metaengine: Json Array size: 1 [23380] digikam.metaengine: ExifTool Json map size: 171 [23380] digikam.metaengine: ExifTool parsed command for action "Load Metadata" [23380] digikam.metaengine: 152 properties decoded [23380] digikam.metaengine: ExifTool "Load Metadata" "-json -G:0:1:2:4:6 -l S:\\SORTERADE\\test\xC3\xB6\\2021-08-12 10-31-54 iPhone 11 Pro.heic" [23380] digikam.metaengine: Loading metadata with "Exiv2" backend from "S:/SORTERADE/testö/2021-08-12 10-31-54 iPhone 11 Pro.heic" [23380] digikam.general: Metadata loading with Exiv2 took 60 ms ( true ) [23380] digikam.general: "Standard Exif Tags" decoding took 0 ms ( false ) [23380] digikam.general: "MakerNote Exif Tags" decoding took 1 ms ( false ) [23380] digikam.general: "IPTC Records" decoding took 0 ms ( true ) [23380] digikam.general: "XMP Schema" decoding took 0 ms ( true ) [23380] digikam.metaengine: ExifToolProcess::readOutput(): ExifTool command completed [23380] digikam.metaengine: ExifTool complete command for action "Load Metadata" with elasped time (ms): 154 [23380] digikam.metaengine: Json Array size: 1 [23380] digikam.metaengine: ExifTool Json map size: 170 [23380] digikam.metaengine: ExifTool parsed command for action "Load Metadata" [23380] digikam.metaengine: 151 properties decoded [23380] digikam.general: Try to get preview from "S:/SORTERADE/testö/2021-08-12 10-31-54 iPhone 11 Pro.heic" [23380] digikam.general: Preview quality: 0 [23380] digikam.metaengine: Loading metadata with "Exiv2" backend from "S:/SORTERADE/testö/2021-08-12 10-31-54 iPhone 11 Pro.heic" [23380] digikam.general: Try to load DImg preview from: "S:/SORTERADE/testö/2021-08-12 10-31-54 iPhone 11 Pro.heic" [23380] digikam.dimg: "S:/SORTERADE/testö/2021-08-12 10-31-54 iPhone 11 Pro.heic" : "HEIF" file identified [23380] digikam.metaengine: Loading metadata with "Exiv2" backend from "S:/SORTERADE/testö/2021-08-12 10-31-54 iPhone 11 Pro.heic" [23380] digikam.dimg.heif: Error while processing HEIF image: Input file does not exist: Unspecified: Error opening file: No such file or directory (2) [23380] [23380] digikam.dimg.heif: Error: Could not read source file. [23380] digikam.dimg: "S:/SORTERADE/testö/2021-08-12 10-31-54 iPhone 11 Pro.heic" : "HEIF" file identified (magic) [23380] digikam.metaengine: Loading metadata with "Exiv2" backend from "S:/SORTERADE/testö/2021-08-12 10-31-54 iPhone 11 Pro.heic" [23380] digikam.dimg.heif: Error while processing HEIF image: Input file does not exist: Unspecified: Error opening file: No such file or directory (2) [23380] [23380] digikam.dimg.heif: Error: Could not read source file. [23380] digikam.dimg: "S:/SORTERADE/testö/2021-08-12 10-31-54 iPhone 11 Pro.heic" : "HEIF" file identified [23380] digikam.metaengine: Loading metadata with "Exiv2" backend from "S:/SORTERADE/testö/2021-08-12 10-31-54 iPhone 11 Pro.heic" [23380] digikam.dimg.heif: Error while processing HEIF image: Input file does not exist: Unspecified: Error opening file: No such file or directory (2) [23380] [23380] digikam.dimg.heif: Error: Could not read source file. [23380] digikam.dimg: "S:/SORTERADE/testö/2021-08-12 10-31-54 iPhone 11 Pro.heic" : "HEIF" file identified (magic) [23380] digikam.metaengine: ExifTool "Load Metadata" "-json -G:0:1:2:4:6 -l S:\\SORTERADE\\test\xC3\xB6\\2021-08-12 10-31-54 iPhone 11 Pro.heic" [23380] digikam.metaengine: Loading metadata with "Exiv2" backend from "S:/SORTERADE/testö/2021-08-12 10-31-54 iPhone 11 Pro.heic" [23380] digikam.dimg.heif: Error while processing HEIF image: Input file does not exist: Unspecified: Error opening file: No such file or directory (2) [23380] [23380] digikam.dimg.heif: Error: Could not read source file. [23380] digikam.dimg: "S:/SORTERADE/testö/2021-08-12 10-31-54 iPhone 11 Pro.heic" : Cannot load file !!! [23380] digikam.general: Cannot extract preview for "S:/SORTERADE/testö/2021-08-12 10-31-54 iPhone 11 Pro.heic" [23380] digikam.metaengine: Loading metadata with "Exiv2" backend from "S:/SORTERADE/testö/2021-08-12 10-31-54 iPhone 11 Pro.heic" [23380] digikam.general: Metadata loading with Exiv2 took 14 ms ( true ) [23380] digikam.general: "Standard Exif Tags" decoding took 0 ms ( false ) [23380] digikam.general: "MakerNote Exif Tags" decoding took 0 ms ( false ) [23380] digikam.general: "IPTC Records" decoding took 0 ms ( true ) [23380] digikam.general: "XMP Schema" decoding took 0 ms ( true ) [23380] digikam.general: Stacked View Mode : 1 [23380] digikam.metaengine: ExifToolProcess::readOutput(): ExifTool command completed [23380] digikam.metaengine: ExifTool complete command for action "Load Metadata" with elasped time (ms): 105 [23380] digikam.metaengine: Json Array size: 1 [23380] digikam.metaengine: ExifTool Json map size: 170 [23380] digikam.metaengine: ExifTool parsed command for action "Load Metadata" [23380] digikam.metaengine: 151 properties decoded
Yes thanks, I wanted to see this log. Hmm, we test with the normal file open function if the file can be read, if not we go the way QFile -> Memory -> libheif reads from memory. Unfortunately we have to use this trick because libheif currently has no function to use UTF16 file paths on Windows. However, the way of reading to memory is not used in the log, which would be normal if the code page used on Windows is the same as your language. I'll test it here later on Windows 10. Maik
I can reproduce the problem here with German special characters. The problem does not exist in digiKam-7.6.0. Maik
Git commit 43d68e300cd4c28363c442f5104032ac36ba9833 by Maik Qualmann. Committed on 07/08/2022 at 16:39. Pushed by mqualmann into branch 'master'. first implementation of a QIODevice HEIF file reader M +45 -52 core/dplugins/dimg/heif/dimgheifloader_load.cpp https://invent.kde.org/graphics/digikam/commit/43d68e300cd4c28363c442f5104032ac36ba9833
Git commit f58030acb0de7f3a3efec270772239367db7fbc5 by Maik Qualmann. Committed on 07/08/2022 at 17:18. Pushed by mqualmann into branch 'master'. factoring QIODevice HEIF file reader M +16 -13 core/dplugins/dimg/heif/dimgheifloader_load.cpp https://invent.kde.org/graphics/digikam/commit/f58030acb0de7f3a3efec270772239367db7fbc5
Git commit 3b8dcdcbdfd85b9df68ddb545010f78c4369aa6e by Maik Qualmann. Committed on 07/08/2022 at 17:45. Pushed by mqualmann into branch 'master'. factoring QIODevice HEIF file reader M +6 -2 core/dplugins/dimg/heif/dimgheifloader_load.cpp https://invent.kde.org/graphics/digikam/commit/3b8dcdcbdfd85b9df68ddb545010f78c4369aa6e
Git commit f26ec266f3c52d6cb1ccd338007829ec0e6111b9 by Maik Qualmann. Committed on 07/08/2022 at 17:51. Pushed by mqualmann into branch 'qt5-maintenance'. backport QIODevice HEIF file reader from git/master FIXED-IN: 7.8.0 M +2 -1 NEWS M +57 -57 core/dplugins/dimg/heif/dimgheifloader_load.cpp https://invent.kde.org/graphics/digikam/commit/f26ec266f3c52d6cb1ccd338007829ec0e6111b9
great, thanks! how do one test this on windows? wait for a new version?
With the next pre-release of digiKam-7.8.0 you can test it from here: https://files.kde.org/digikam/ @Gilles, can you start a new build? Maik
Hi Maik, I'm not at home until 22 august. Here i have a limited internet connection. Gilles
Flatpak builds already support heif. For Craft builds, a patch much be done to include libheif dependency: https://invent.kde.org/packaging/craft-blueprints-kde/-/issues/5
hi, downloaded the new build and can confirm that it's working now, BUT - when you go to preview mode, it takes a very long (up to 6 seconds) to first load the picture and then to move to the next HEIC picture. JPEGs are showing without delays but if you scroll thrue HEIC pictures it takes very long time. Unfortunately it also seems to be the case for ALL HEIC pictures, even if they do not have swedish characters in path.
HEIF encoding/decoding is not the same than JPEG. It's very CPU consuming. All is delegate to libheif library which host codecs to process image data.
The new QIODevice HEIF file reader does not slow down the loading of images, I have tested that. However, the libheif we are currently using is older than when it was still part of digiKam. But there is already a bug report at libheif to release a new version. Maik
Created attachment 151525 [details] logfile I did some thest here by installing 7.7 again and comparing back and forth with 7.8 method - start digikam fresh - chose an album with 30 random HEICs (but no swedish/nordic characters in path) - double click on first picture to get into preview - immediately after it loads, use right arrow key to go to next picture and repeat to see all 30 pictures - compare this several times to see if it differs. as you can see in the log attached 7.7.0 does this sequence in roughly 90sec, whereas 7.8.0 takes roughly 120sec. ofcourse there are some human interaction and respons times involved, but that goes for test both on 7.7 and 7.8. this is repeatable and consistens, so I would say digiKam-7.8.0-20220822T192500-Win64-debug.exe clearly loads HEIC slower.. or am I missing something..
Note: I just rebuild 7.8.0 today. libheif is not integrated as rolling release code, so lib is always recompiled from git/master at each digiKam build Gilles
A test here under Linux with a HEIF image that takes about 8 seconds to load shows no difference between the Standard File API and the new QIODevice reader. I can't imagine that QIODevice is that much worse under Windows, the test is pending. What brings an advantage of 500ms is to load the file into memory beforehand with QIODevice and then load the image with the memory function of libheif. Maik
A test here under Windows10 with Intel Core I5 (laptop) also shows no abnormalities. Measured with DebugView Log: digiKam-7.7.0 => 6.49 seconds (slower!) digiKam-7.8.0 => 6.20 seconds Tried several times and verified that the image does not exist in the cache. The preview has been set to full image preview, not reduced preview. Which antivirus program do you use? Maik
WinSlide, I tested here with my Win10 VM with 7.7.0 and 7.8.0 and i found similar performances between both versions than time reported by Maik. It's not the same loading time, but i don't reproduce the long latency that you seen on your computer. My HEIF files come from my Apple iPhone 7 (last iOS update installed). So please check your system, especially the antivirus stuff. Best Gilles Caulier
Note: on my Win10 VM, none antivirus is running in background. Gilles Caulier