Bug 353608 - The preview has blocky artifacts reminiscent of chroma subsampling [patch]
Summary: The preview has blocky artifacts reminiscent of chroma subsampling [patch]
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Preview-Image (show other bugs)
Version: 4.12.0
Platform: Gentoo Packages Linux
: NOR critical
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-06 14:45 UTC by DrSlony
Modified: 2015-10-09 05:32 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.14.0
Sentry Crash Report:


Attachments
jpegloader.patch (570 bytes, patch)
2015-10-08 10:39 UTC, Maik Qualmann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description DrSlony 2015-10-06 14:45:31 UTC
The preview is blocky in areas of highly saturated red, the effect looks like chroma subsampling (though it might be something else entirely, since why would it get resampled?). Image zoomed to 100%. I thought maybe LCMS was doing something, but its the same when I turn color management off.
I was previewing this image: http://londonlight.org/i/2015-10-01_k10d_9.jpg
This screenshot shows what happens in digiKam vs Geeqie on the left.
Look closely at the circled area http://filebin.net/ca6id4n3of/scrot_2015-10-06_163914.png
Same strange thing when I open it in the image editor.

Fine in RawTherapee, Gwenview, Geeqie and GIMP.

Reproducible: Always
Comment 1 DrSlony 2015-10-07 07:56:59 UTC
I just found that it's not only the preview but also the saved image which has artifacts. This means digiKam breaks every single photo it saves!!! (though the breakage is not easily visible unless you're working with highly saturated colors)
imagemagick has a very useful "compare" function. I opened the image in digiKam's editor and saved to PNG. The comparison should be identical, but
  compare 2015-10-01_k10d_9.jpg 2015-10-01_k10d_9.png c.tif
leads to
  http://i.imgur.com/RgBqnSq.png
and these differences/artifacts are very easy to see in the preview and in the saved PNG.
Changing priority to critical as this means essentially digiKam breaks photos.
Comment 2 Maik Qualmann 2015-10-08 10:39:45 UTC
Created attachment 94889 [details]
jpegloader.patch

Patch for this problem, better quality of 4:2:2 images.

Maik
Comment 3 DrSlony 2015-10-08 12:12:58 UTC
Thank you for quickly addressing this. I confirm that the patch fixes the problem.
Comment 4 Maik Qualmann 2015-10-08 17:20:49 UTC
Git commit d92ef8575e5671cc102875ffc48bbb2a87bdfc9a by Maik Qualmann.
Committed on 08/10/2015 at 17:18.
Pushed by mqualmann into branch 'master'.

apply patch #94889 to change the JPEG decompression parameter for a better quality
FIXED-IN: 4.14.0

M  +2    -1    NEWS
M  +1    -1    libs/dimg/loaders/jpegloader.cpp

http://commits.kde.org/digikam/d92ef8575e5671cc102875ffc48bbb2a87bdfc9a
Comment 5 caulier.gilles 2015-10-09 05:32:01 UTC
Git commit 4efe671d183fd1889767c2972b3d52a80568d3af by Gilles Caulier.
Committed on 09/10/2015 at 05:30.
Pushed by cgilles into branch 'frameworks'.

backport commit #d92ef8575e5671cc102875ffc48bbb2a87bdfc9a from git/master to frameworks branch

M  +1    -1    libs/dimg/loaders/jpegloader.cpp

http://commits.kde.org/digikam/4efe671d183fd1889767c2972b3d52a80568d3af