[poppler] poppler/GfxState.cc
Albert Astals Cid
aacid at kemper.freedesktop.org
Mon Jun 21 12:38:22 PDT 2010
poppler/GfxState.cc | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
New commits:
commit 38e5d28a184d0ca8df71a7ea910ce85d7a225e4e
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 7140efc..fe3ee77 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