]> Dogcows Code - chaz/openbox/commitdiff
put the devation back how it used to be, it aws definately no better..
authorDana Jansens <danakj@orodu.net>
Tue, 20 May 2003 23:53:32 +0000 (23:53 +0000)
committerDana Jansens <danakj@orodu.net>
Tue, 20 May 2003 23:53:32 +0000 (23:53 +0000)
render/color.c
render/render.c

index b9bafe32fefd06f3d0ccd3d1e24de44cbe7591d8..ca1f6e89c5aa30e8591e0bc515a9ac85086c493e 100644 (file)
@@ -234,9 +234,7 @@ void increase_depth(pixel32 *data, XImage *im)
                     g = (pseudo_colors[ii].green - icolor.green) & 0xff;
                     b = (pseudo_colors[ii].blue - icolor.blue) & 0xff;
                     /* find a weighted absolute deviation */
-                    dev = (r * r) * (0xff - (icolor.red & 0xff)) +
-                        (g * g) * (0xff - (icolor.green & 0xff)) +
-                        (b * b) * (0xff - (icolor.blue & 0xff));
+                    dev = (r * r) + (g * g) + (b * b);
 
                     if (dev < closest) {
                         closest = dev;
index 9b721db30ada08708cbf54bd25a46eb92cbd02b2..f8920c25b76845536014144883ba3c0646412813 100644 (file)
@@ -167,9 +167,7 @@ void pseudocolor_startup(void)
         g = (pseudo_colors[i].green - icolors[ii].green) & 0xff;
         b = (pseudo_colors[i].blue - icolors[ii].blue) & 0xff;
         /* find a weighted absolute deviation */
-        dev = (r * r) * (0xff - (icolors[ii].red & 0xff)) +
-            (g * g) * (0xff - (icolors[ii].green & 0xff)) +
-            (b * b) * (0xff - (icolors[ii].blue & 0xff));
+        dev = (r * r) + (g * g) + (b * b);
 
         if (dev < closest) {
           closest = dev;
This page took 0.027871 seconds and 4 git commands to generate.