[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lookup_rgb_color] Distorted colours
From: |
Gerd Moellmann |
Subject: |
Re: [lookup_rgb_color] Distorted colours |
Date: |
30 Aug 2003 19:27:36 +0200 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 |
Jesper Harder <address@hidden> writes:
> ... but still wrong.
OK, one last try :). What graphics card is that, BTW?
--- xfns.c.~1.593.~ Thu Aug 28 14:28:24 2003
+++ xfns.c Sat Aug 30 19:26:09 2003
@@ -6764,8 +6764,12 @@
visual = FRAME_X_DISPLAY_INFO (f)->visual;
if (visual->class == TrueColor)
{
- int bits = visual->bits_per_rgb;
+ int nentries = 1 + visual->blue_mask;
+ int bits = 0;
unsigned long pr, pg, pb;
+
+ while ((nentries & (1 << bits)) == 0)
+ ++bits;
/* Apply gamma-correction like normal color allocation does. */
if (f->gamma)