[poppler] Branch 'poppler-0.14' - poppler/GfxState.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Mon Jun 21 12:38:48 PDT 2010


 poppler/GfxState.cc |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 714db8900b2f72bd63811a16bfb81beb23397bba
Author: Albert Astals Cid <aacid at kde.org>
Date:   Mon Jun 21 20:38:00 2010 +0100

    more pow 0.5 -> sqrt

diff --git a/poppler/GfxState.cc b/poppler/GfxState.cc
index 4f83e61..b59a478 100644
--- a/poppler/GfxState.cc
+++ b/poppler/GfxState.cc
@@ -672,9 +672,9 @@ void GfxCalGrayColorSpace::getRGB(GfxColor *color, GfxRGB *rgb) {
   r = xyzrgb[0][0] * X + xyzrgb[0][1] * Y + xyzrgb[0][2] * Z;
   g = xyzrgb[1][0] * X + xyzrgb[1][1] * Y + xyzrgb[1][2] * Z;
   b = xyzrgb[2][0] * X + xyzrgb[2][1] * Y + xyzrgb[2][2] * Z;
-  rgb->r = dblToCol(pow(clip01(r * kr), 0.5));
-  rgb->g = dblToCol(pow(clip01(g * kg), 0.5));
-  rgb->b = dblToCol(pow(clip01(b * kb), 0.5));
+  rgb->r = dblToCol(sqrt(clip01(r * kr)));
+  rgb->g = dblToCol(sqrt(clip01(g * kg)));
+  rgb->b = dblToCol(sqrt(clip01(b * kb)));
   rgb->r = rgb->g = rgb->b = clip01(color->c[0]);
 }
 
@@ -1246,9 +1246,9 @@ void GfxLabColorSpace::getRGB(GfxColor *color, GfxRGB *rgb) {
   r = xyzrgb[0][0] * X + xyzrgb[0][1] * Y + xyzrgb[0][2] * Z;
   g = xyzrgb[1][0] * X + xyzrgb[1][1] * Y + xyzrgb[1][2] * Z;
   b = xyzrgb[2][0] * X + xyzrgb[2][1] * Y + xyzrgb[2][2] * Z;
-  rgb->r = dblToCol(pow(clip01(r * kr), 0.5));
-  rgb->g = dblToCol(pow(clip01(g * kg), 0.5));
-  rgb->b = dblToCol(pow(clip01(b * kb), 0.5));
+  rgb->r = dblToCol(sqrt(clip01(r * kr)));
+  rgb->g = dblToCol(sqrt(clip01(g * kg)));
+  rgb->b = dblToCol(sqrt(clip01(b * kb)));
 }
 
 void GfxLabColorSpace::getCMYK(GfxColor *color, GfxCMYK *cmyk) {


More information about the poppler mailing list