Bug 376124

Summary: Some Photos are not previewed
Product: [Applications] digikam Reporter: Evert Vorster <evorster>
Component: Preview-ImageAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: caulier.gilles, metzpinguin
Priority: NOR    
Version: 5.4.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 6.0.0
Attachments: Photo which does not show a preview in DigiKam or Dolphin (but works fine in GwenView)

Description Evert Vorster 2017-02-07 05:45:24 UTC
Created attachment 103873 [details]
Photo which does not show a preview in DigiKam or Dolphin (but works fine in GwenView)

Some images created by my phone do not show a preview icon in the album view. 
When clicking on the image, it also does not open.

Admittedly some of these images are large, and this bug appears to be related to bug 328090. However, I have a 3.4mb file that also does not load in both DigiKam and Dolphin, but loads fine in Gwenview. So, it is not related to filesizem and that bug.

I am adding an example photo as an attachment to this bug.
Comment 1 caulier.gilles 2017-02-07 05:50:41 UTC
Which Linux system do you use ? digiKam is installed by a system package ?

Gilles Caulier
Comment 2 Maik Qualmann 2017-02-07 07:04:54 UTC
I think this JPEG is broken, yes Gwenview opens it. But Gimp, Krita, Okular, and others do not. Here are the error messages from the QImage loader:

Invalid SOS parameters for sequential JPEG
Unsupported marker type 0xbe

Maik
Comment 3 Evert Vorster 2017-02-07 11:25:27 UTC
Hi there. 

Since this image is opened without fault on other operating systems, it may be that I need to file this bug against QImage

Kind regards,
Evert
Comment 4 caulier.gilles 2017-02-07 11:27:47 UTC
No. It's not a QImage problem, because we use a dedicated JPEG loader in digiKam.

Perhaps this case of broken JPEG is not handle in DK JPEGLoader.cpp

Gilles Caulier
Comment 5 Evert Vorster 2017-02-07 11:32:06 UTC
ImageMagick also opens the file, even though it complains about the same errors:

[evert@Vorster 2017-01 TDT Derig]$ display 20170104_084136.jpg
display: Invalid SOS parameters for sequential JPEG `20170104_084136.jpg' @ warning/jpeg.c/JPEGWarningHandler/352.
display: Corrupt JPEG data: 194 extraneous bytes before marker 0xbe `20170104_084136.jpg' @ warning/jpeg.c/JPEGWarningHandler/352.
display: Unsupported marker type 0xbe `20170104_084136.jpg' @ warning/jpeg.c/JPEGErrorHandler/319.
[evert@Vorster 2017-01 TDT Derig]$
Comment 6 Maik Qualmann 2018-07-03 10:38:38 UTC
Git commit 84265d4d457e9c96ffab49342a3201cb79212c16 by Maik Qualmann.
Committed on 03/07/2018 at 10:37.
Pushed by mqualmann into branch 'master'.

use already read image data up to libjpeg error
Related: bug 382174, bug 386188
FIXED-IN: 6.0.0

M  +4    -1    NEWS
M  +51   -10   core/libs/dimg/loaders/jpegloader.cpp

https://commits.kde.org/digikam/84265d4d457e9c96ffab49342a3201cb79212c16