put the devation back how it used to be, it aws definately no better..

This commit is contained in:
Dana Jansens 2003-05-20 23:53:32 +00:00
parent 76425437d4
commit 9e33652f71
2 changed files with 2 additions and 6 deletions

View 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;

View 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;