This is the mail archive of the
cygwin-xfree@cygwin.com
mailing list for the Cygwin XFree86 project.
RE: Color Problem
- To: "Cygx \(E-mail\)" <cygwin-xfree at sources dot redhat dot com>
- Subject: RE: Color Problem
- From: "Harold Hunt" <huntharo at msu dot edu>
- Date: Wed, 21 Mar 2001 12:05:11 -0500
Cool, I think I have an idea on what to change now.
Thanks for the help,
Harold
-----Original Message-----
From: cygwin-xfree-owner@sources.redhat.com
[mailto:cygwin-xfree-owner@sources.redhat.com]On Behalf Of Alexander
Gottwald
Sent: Wednesday, March 21, 2001 10:30 AM
To: XFree86/Cygwin Mailing list
Subject: Color Problem
Hey,
I just investigated the color problem and found the two reasons why
colors are distorted.
16bpp:
------
red and blue values are switched
xpyinfo gives the following lines on linux xfree:
visual:
visual id: 0x43
class: TrueColor
depth: 16 planes
available colormap entries: 64 per subfield
red, green, blue masks: 0xf800, 0x7e0, 0x1f
significant bits in color specification: 6 bits
for the windows box this is
visual:
visual id: 0x26
class: DirectColor
depth: 16 planes
available colormap entries: 64 per subfield
red, green, blue masks: 0x3f, 0x7c0, 0xf800
significant bits in color specification: 8 bits
important are the masks
linux: red, green, blue masks: 0xf800, 0x7e0, 0x1f
windows: red, green, blue masks: 0x3f, 0x7c0, 0xf800
As you can see this is mixed.
second problem:
there is a wrap around in every color at 50% color.
this means if you let for example the green and blue value fixed at 0
and count the redvalue up from 0 to 1 (let 1 be the maximum), the maximum
color
intensity is reached at 0.5 and after 0.5 it starts again with all black.
If you have a linux box, you can try this with the Gtk color chooser.
This is indicated by the field "significant bits in color specification"
in the xdpyinfo output. Linux says 6, windows says 8.
24bpp:
------
Here is just the red and blue value switched. The significant bit value
is correctly at 8 bits.
Xdpyinfo say on the windows box:
visual:
visual id: 0x26
class: DirectColor
depth: 24 planes
available colormap entries: 256 per subfield
red, green, blue masks: 0xff, 0xff00, 0xff0000
significant bits in color specification: 8 bits
This evening i will look again into the source to find a place, where its
broken, but maybe some of you, who are familar with the Xserver directory
can give me a hint where to look.
cu
ago
--
Alexander.Gottwald@informatik.tu-chemnitz.de
http://www.gotti.org
+49 3725 3498080