Server/Viewer pixel depth questions
Grant McDorman
grant.mcdorman@cedara.com
Tue Dec 17 15:49:01 2002
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On December 17, 2002 04:09 am, Shing-Fat Fred Ma wrote:
> Hello,
>
> I thought I overcame the problem of 8-bit
> desktops crashing as soon as a viewer connects
> to it from a 24-bit desktop. I might have been
> wrong. I just tried again and the 8-bit desktop
> died. The only difference between
>
> When I launch the viewer, I get the message
>
> Connected to VNC server, using protocol version 3.3
> VNC server default format:
> 8 bits per pixel.
> True colour: max red 7 green 7 blue 3, shift red 0 green 3 blue 6
This is the server, which is 8 bit TrueColour. Some applications may not like
this <grin>.
> Using default colormap which is TrueColor. Pixel format:
> 32 bits per pixel.
> Most significant byte first in each pixel.
> True colour: max red 255 green 255 blue 255, shift red 16 green 8
> blue 0
This is the local (viewer) machine, which has a TrueColour display. The pixel
information refers to the viewer's internal colour handling.
For comparison, the output from the latest RealVNC viewer on my Sun Sparc
connecting to a TrueColour windows machine is:
VNC server default format:
32 bits per pixel.
Least significant byte first in each pixel.
True colour: max red 255 green 255 blue 255, shift red 16 green 8 blue 0
Using default colormap and visual, TrueColor, depth 24.
Using viewer's native pixel format:
32 bits per pixel.
Most significant byte first in each pixel.
True colour: max red 255 green 255 blue 255, shift red 0 green 8 blue 16
The output in this version is a little clearer.
> Obviously, the 8bpp is for the server while the 32bpp is
> for the desktop from which the viewer was launched.
> This is strange, since the latter has 24bpp. The message
> remains the same even if the viewer is invoked with
> "-depth 8". And the log file for the 8bpp server shows
> that client (i.e. the viewer) has 32bpp format, regardless
> of whether the viewer was launched with "-depth 8".
The -depth option for the viewer could be better described as a 'hint'; i.e.
in your case, you're asking the viewer to use depth 8 *if possible*. However,
most hardware does not support multiple simutaneous depths (the only kind I
know of personally that does is some Sun Sparc display boards).
On top of that, the '-depth' option is pretty useless without the '-owncmap'
option. Lacking the latter, the viewer will still use the default colourmap
even if an 8 bit visual is available. So to get an 8-bit visual and
colourmap, you have to use '-depth 8 -owncmap'.
In my case, the output from 'vncviewer' with these options is:
VNC server default format:
32 bits per pixel.
Least significant byte first in each pixel.
True colour: max red 255 green 255 blue 255, shift red 16 green 8 blue 0
PseudoColor visual with private colormap, depth 8.
Using viewer's native pixel format:
8 bits per pixel.
Colour map (not true colour).
Incidentally, in testing this I found a problem with the viewer: if there are
resources (xrdb -query) that specify colours for the controls in the viewer,
the viewer will crash.
- --
Grant McDorman <grant.mcdorman@cedara.com>, Sr. Software Design Consultant
Cedara Software Corp. <URL:http://www.cedara.com>
(formerly I.S.G. Technologies Inc.)
Mississauga, Ontario, Canada
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.0 (SunOS)
iD8DBQE9/0YKLVa+EmyjizARAmsIAJ42/qVppJQvFgbELEh4Fe4fO8nxdACaAhyW
jwp0FcKn2F46Te2qPoa17G8=
=AZFd
-----END PGP SIGNATURE-----