From: Albert Astals Cid <[email protected]> Subject: Re: [poppler] XYZ white point correction patch Date: Tue, 23 Jun 2009 00:22:17 +0200 Message-ID: <[email protected]>
aacid> A Dissabte, 23 de maig de 2009, Hal V. Engel va escriure: aacid> > On Saturday 23 May 2009 02:55:29 am Albert Astals Cid wrote: aacid> > > > According to the PDF spec. the Y white point value should always be aacid> > > > 1.0. So it might be possible to just do the correction to X and Z since aacid> > > > this would make the code slightly more efficient. Also I now think it aacid> > > > would be better to do this in GfxCalGrayColorSpace::getXYZ() and aacid> > > > GfxLabColorSpace::setXYZ() instead of in the locations right after aacid> > > > calls to these functions. aacid> > > aacid> > > When i mean no difference i mean "diff" says the files are exactly the aacid> > > same, not that i'm not able to see a difference in them. aacid> > > aacid> > > May it be because i'm not using any color profile? aacid> > > aacid> > > Albert aacid> > aacid> > It could be but the current code base defaults to sRGB as the output aacid> > profile if one is not specified by the calling app. So if poppler was aacid> > built using USE_CMS then by default it should be using sRGB as the output aacid> > color space for CIELab, Cal* and ICC objects. aacid> > aacid> > To confirm that you are using a profile you might consider modifying your aacid> > code so that it explicitly sets the output profile by calling aacid> > setOutputProfileName() or setOutputProfile() before opening the document. aacid> > For additional testing I am attaching a profile intended for testing that aacid> > causes the colors to be transformed in a way that is unmistakable because aacid> > it transforms blues into reds and reds into blues. Using this profile it aacid> > should be easy to confirm that your code is actually using an output aacid> > profile and also which parts of the rendered output are using the output aacid> > profile. aacid> > aacid> > No matter what output profile is being used there should be at least some aacid> > difference in the resulting RGB values of CIELab and CalGray objects if the aacid> > white point of the object is NOT X = Y = Z = 1.0. I have placed printf() aacid> > statements in the code to confirm that this is altering the XYZ values of aacid> > the CIELab objects in the altona pdf and it is. I have also confirmed aacid> > through testing that this makes a visible difference in the rendered output aacid> > at least if the white point is significantly different from X = Y =Z = 1.0. aacid> > aacid> > Also I cleaned up the white point code so that the white point correction aacid> > is now taking place in the getXYZ() functions which is where is really aacid> > belongs. I have attached a patch with this set of changes. aacid> aacid> Ok, i've tested the patch and yes, i need to load a displayProfile, otherwise aacid> it seems to do nothing, the problem is that the differences i see are so minor aacid> i can't say if it is correct with the patch or without it. aacid> aacid> Do you have other PDF that shows a more visible difference? aacid> aacid> Koji is that inside your area of expertice and can say yay/nay to the patch? aacid> I'm afraid that I don't have enough knowledge about this to say the patch is correct or not. ------- Koji Otani. _______________________________________________ poppler mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/poppler
