[poppler] Testing color management functionality

Koji Otani sho at bbr.jp
Fri May 15 00:14:36 PDT 2009

From: Albert Astals Cid <aacid at kde.org>
Subject: Re: [poppler] Testing color management functionality
Date: Thu, 14 May 2009 19:40:17 +0200
Message-ID: <200905141940.20444.aacid at kde.org>

aacid> A Dimecres, 13 de maig de 2009, Hal V. Engel va escriure:
aacid> > Now that it looks like the color management support will be released with
aacid> > version 0.12 I decided to do some more testing.  I did this testing using a
aacid> > patched version of the Qt4 demo viewer (the same patch set I sent to the
aacid> > email list on Monday) using the altona pdf test suite
aacid> > http://www.eci.org/doku.php?id=en:downloads.  This test suite has tests for
aacid> > many things but I was only interested in those that were related to color
aacid> > rendering.
aacid> >
aacid> > The most significant issues are with the following test elements:
aacid> >
aacid> > #26 "Duotone and Spot Color"  Poppler fails the spot color test but appears
aacid> > to work for the doutone test.
aacid> >
aacid> > #27 "Overprinting spot color and process color black"  Only the overprinted
aacid> > color is displayed.
aacid> >
aacid> > #28 "Overprinting process colors only"  Only the overprinted color is
aacid> > displayed.
aacid> >
aacid> > #34 through #38 These are renderings involving different source color
aacid> > spaces and/or different rendering intents.  Currently the color management
aacid> > code in poppler does not handle rendering intents and this shows up in
aacid> > tests #35 through #38.  But it also appears that CM is not functioning at
aacid> > all for vector elements (test #34).
aacid> >
aacid> > The altone test suite appears to be comprehensive and is a harsh test of
aacid> > any PDF rendering engine but it should help to find and correct rendering
aacid> > issues since each test element only tests a specific well documented
aacid> > feature.
aacid> >
aacid> > Not all of the above issues are specifically color management problems. 
aacid> > #34 through #38 are definitely color management issues and #26 (spot color)
aacid> > may also be a color management issue.  #27 and #28 may be transparency
aacid> > issues but may also be impacted by color management.
aacid> >
aacid> > I think one goal for v 0.12 should be for poppler to be able to pass all
aacid> > (or maybe most) of the above tests.
aacid> Koji any input on this?

Poppler doesn't support overprinting, so #27 and #28 fail.
I'm not sure poppler support spot color.

Colors of vector regions are same as those of pixel regions in #34-#38.

When _ICC_PROFILE atom doesn't exist, qt4/demos/poppler_qt4viewer
produces following error.

lcms: Error #12288; Read from memory error. Got 0 bytes, block should
be of 128 bytes

I attached patch to fix this.
Please note that XGetWindowProperty returns 'Success' even when
requested atom doesn't exist.

Koji Otani
-------------- next part --------------
--- viewer.cpp.org	2009-05-15 15:19:47.000000000 +0900
+++ viewer.cpp	2009-05-15 15:31:19.000000000 +0900
@@ -429,7 +429,8 @@
     if( XGetWindowProperty ( QX11Info::display (),  QX11Info::appRootWindow(-1),
                              ICCatom, 0, INT_MAX, False, XA_CARDINAL, &atomType,
                              &format, &atomSize, &bytesAfter,
-                             (unsigned char **) &profileAtomBuffer) == Success) {
+                             (unsigned char **) &profileAtomBuffer) == Success
+	&& atomType == XA_CARDINAL) {
         profile = cmsOpenProfileFromMem(profileAtomBuffer, atomSize);
         XFree (profileAtomBuffer);

More information about the poppler mailing list