Bug 52126

Summary: krfb mangles colours when serving 8-bit displays
Product: [Applications] krfb Reporter: grant mcdorman <grant.mcdorman>
Component: generalAssignee: tim
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:

Description grant mcdorman 2002-12-20 03:45:50 UTC
Version:            (using KDE KDE 3.0.99)
Installed from:    Compiled From Sources
Compiler:          gcc 3.2 
OS:          Linux

Colours appear very strange when krfb is serving 8 bit displays.

Inspection of the source reveals that when server->rfbServerFormat.bitsPerPixel == 8, redMax is set to 3, greenShift is set to 2, and blueShift is set to 5. This causes krfb to use only 7 bits of the pixel, with 2 bits for red and blue, and 3 for green. In comparision, normal VNC 8-bit true colour uses all 8 pixel bits, allocating 3 bits for red.

Changing the source to the standard VNC 3/3/2 encoding and recompiling did not cause any observable problems.
Comment 1 tim 2003-02-08 14:06:13 UTC
Fixed in 3.1 (and for some weeks in HEAD). I hope that the fix is correct, as I dont 
have 8-bit capable hardware. I tested by sharing a vncserver instance with 8 bit 
depth...