[poppler] XYZ white point correction patch
Hal V. Engel
hvengel at astound.net
Sun May 17 16:44:24 PDT 2009
On Sunday 17 May 2009 12:44:51 pm Albert Astals Cid wrote:
> A Diumenge, 17 de maig de 2009, Hal V. Engel va escriure:
> > Here is a patch that will apply the white point correction after a call
> > to getXYZ(). This patch can be applied to current git.
> >
> > Hal
>
> Do you have a pdf that shows what this fixes?
>
> Albert
#35 on the altona test pdf shows this for the Lab to XYZ conversion. Without
the white point correction the difference between the upper right ECI-RGB
ICCBased image and the lower left CIELAB image is apparent although it was not
a huge difference. With this fix the difference goes away. This was testing
with color management enabled. This test is NOT valid with color management
disabled.
I don't have test PDFs for the calRGB or calGray cases. The altona test PDF
does not have any CalRGB or CalGray objects. The CIE to XYZ conversions do
need a white point correction other than CalRGB. At least that is what is
shown in the PDF specification for these conversions.
After looking closer just now at the CalRGB to XYZ documentation I see that
the CalRGB to XYZ conversion does not use the white point values in the
conversion unlike CalGray to XYZ and Lab to XYZ. But the original code was
doing a white point correction but it was dividing by the white point so this
was clearly incorrect because the conversion should not do a separate white
point correction since this is handled by the matrix. I made a mistake when I
saw the incorrect WP conversion in the CalRGB code and assumed that it should
be the same as the CalGray and Lab code when in fact it should have been
removed.
Also it might be common for these objects to use the default white point of X
= Y= Z = 1.0 in which case this will not make any difference. But I am not
sure how common this is and the PDF documentation implies that D65 is the
recommended WhitePoint ([ 0.9505 1.0000 1.0890 ]) for CalRGB and CalGray.
I have attached a new version of the patch that removes all white point
corrections from the code for CalRGB.
Hal
-------------- next part --------------
A non-text attachment was scrubbed...
Name: XYZ-white-point-correction-2.patch
Type: text/x-patch
Size: 3630 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/poppler/attachments/20090517/70ecb5ac/attachment.bin
More information about the poppler
mailing list