Bug 396403 - okular/KF5 support for 'v4 YCC-RGB' and 'v2 GBR' ICC profiles is broken
Summary: okular/KF5 support for 'v4 YCC-RGB' and 'v2 GBR' ICC profiles is broken
Status: RESOLVED UPSTREAM
Alias: None
Product: okular
Classification: Applications
Component: PDF backend (show other bugs)
Version: 1.4.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-11 10:40 UTC by Ralf Habacker
Modified: 2018-07-11 14:35 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Screenshot (181.86 KB, image/png)
2018-07-11 10:40 UTC, Ralf Habacker
Details
Screenshot (OK) on Debian testing (329.57 KB, image/png)
2018-07-11 11:57 UTC, Michael Weghorn
Details
Test PDF file being used (100.31 KB, application/pdf)
2018-07-11 12:05 UTC, Michael Weghorn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Habacker 2018-07-11 10:40:58 UTC
Created attachment 113883 [details]
Screenshot

okular support for 'v4 YCC-RGB' and 'v2 GBR' ICC profiles is broken compared to the KDE4 based variant. 

How to reproduce:
1. Download http://www.color.org/version4pdf.pdf
2. Open in okular

What happens:
The lower left and upper right quarter does not show the expected colors. Instead the quarter shows incorrect colors e.g. the sky is reddish (see screenshot)

What is expected:
The lower left and upper right quarter should show the expected colors.

Additional informations:
Distribution: openSUSE Leap 42.3
okular-18.04.2-1.1.x86_64
libpoppler-glib8-0.43.0-5.1.x86_64
libpoppler60-0.43.0-5.1.x86_64
libpoppler-qt5-1-0.43.0-5.1.x86_64
libpoppler-cpp0-0.43.0-5.1.x86_64
poppler-tools-0.43.0-5.1.x86_64
poppler-data-0.4.7-6.1.noarch
typelib-1_0-Poppler-0_18-0.43.0-5.1.x86_64

KDE4 variant:
Distribution: openSUSE 13.2
Qt: 4.8.6
KDE: 4.14.9
Okular: 0.21.3
okular-14.12.3-16.1.x86_64
libpoppler-qt4-4-0.26.5-6.1.x86_64
poppler-data-0.4.7-1.2.noarch
libpoppler-cpp0-0.26.5-1.1.x86_64
libpoppler46-0.26.5-6.1.x86_64
poppler-tools-0.26.5-6.1.x86_64
libpoppler-glib8-0.26.5-6.1.x86_64
Comment 1 Michael Weghorn 2018-07-11 11:57:27 UTC
Created attachment 113885 [details]
Screenshot (OK) on Debian testing
Comment 2 Michael Weghorn 2018-07-11 11:58:38 UTC
It looks just fine for me here on Debian testing with either Okular 1.3.2 shipped by Debian or the current self-compiled development version from git, s. screenshot (attachment 113885 [details]). Is this maybe a problem with some other component/library on your system?
Comment 3 Michael Weghorn 2018-07-11 12:05:04 UTC
Created attachment 113886 [details]
Test PDF file being used

(Attaching the PDF file being used to make sure it will continue to work independent of the current URL.)
Comment 4 Oliver Sander 2018-07-11 12:19:50 UTC
That's odd.  I can reproduce the bug with a hand-compiled poppler (no Okular involved) on an up-to-date Debian testing.  The problem shows both with the splash and arthur backends (tested using test-render-to-file-qt5).  It does not show when using the cairo backend (tested using pdftocairo).  Would I need an additional poppler build dependency to get those profiles working?
Comment 5 Michael Weghorn 2018-07-11 12:35:20 UTC
(In reply to Oliver Sander from comment #4)
> That's odd.  I can reproduce the bug with a hand-compiled poppler (no Okular
> involved) on an up-to-date Debian testing.  The problem shows both with the
> splash and arthur backends (tested using test-render-to-file-qt5).  It does
> not show when using the cairo backend (tested using pdftocairo).  Would I
> need an additional poppler build dependency to get those profiles working?

Does the output of your cmake command show anything that's missing? At first glance, "lcms2" looks most "suspicious", since it has to do with ICC profiles, but I did not have any closer look so far.
Comment 6 Michael Weghorn 2018-07-11 12:42:25 UTC
Or, you can also just try "sudo apt build-dep poppler" to get all the build-dependencies specified in the Debian source package.
Comment 7 Oliver Sander 2018-07-11 13:00:19 UTC
I checked, and the poppler installation in question was build without libcms2.  I'll try to check tonight whether building with libcms2 changes anything.

Ralf, does your Okular installation depend on libcms2?
Comment 8 Ralf Habacker 2018-07-11 13:20:19 UTC
yes
rpm -q -f /usr/lib64/libpoppler-qt5.so.1
libpoppler-qt5-1-0.43.0-5.1.x86_64
ldd /usr/lib64/libpoppler-qt5.so.1 | grep poppler
        libpoppler.so.60 => /usr/lib64/libpoppler.so.60
ldd /usr/lib64/libpoppler.so.60 | grep cms
        liblcms2.so.2 => /usr/lib64/liblcms2.so.2
rpm -q -f /usr/lib64/liblcms2.so.2
liblcms2-2-2.8-5.3.x86_64
Comment 9 Oliver Sander 2018-07-11 13:33:35 UTC
When I build with liblcms2 enabled the bug disappears.  Yet you claim that you do have liblcms2 *and* the bug.  That's odd.  Could it be a suse packaging bug?
Comment 10 Luigi Toscano 2018-07-11 13:36:51 UTC
Debian testing has poppler 0.63.0, maybe something was fixed between 0.43.0 and 0.63.0.
Comment 11 Ralf Habacker 2018-07-11 14:11:33 UTC
poppler 0.43.0 is the official version for openSUSE Leap 42.3 (see https://software.opensuse.org/package/poppler).

Using the variant from KDE:Qt:5.11 project (which is 0.63.0) fixes the issue.
openSUSE Leap 42.3 is maintained until Jan 2019 (see https://en.opensuse.org/Lifetime), so I guess the official poppler package needs an update. 

Thanks for you support.
Comment 12 Ralf Habacker 2018-07-11 14:35:08 UTC
File a related bug, see https://bugzilla.opensuse.org/show_bug.cgi?id=1100900