Re: [gtk-vnc-devel] Fix pixel shift for BGR format servers
- From: "Daniel P. Berrange" <berrange redhat com>
- To: gtk-vnc-devel <gtk-vnc-devel lists sourceforge net>
- Subject: Re: [gtk-vnc-devel] Fix pixel shift for BGR format servers
- Date: Tue, 10 Jul 2007 22:32:46 +0100
On Tue, Jul 10, 2007 at 10:15:44PM +0100, Daniel P. Berrange wrote:
> The code which currently calculates the pixel shift for converting data
> from remote to local encoding is assuming the server is in RGB format
> pixels. If I run a server in BGR format, then the colours are rather
> messed up. I've attached a patch which tries to correct it - although its
> not perfect because now, the code assume either RGB, or BGR - is it possible
> for a server to use GRB, or GBR ?!?! If not then this may be sufficient.
>
> I'm also not entirely convinced this is correct wrt to local server
> format, eg if your local desktop ran in BGR instead of RGB. I don't have
> any system I can make run in BGR locally though, so can't test.
Hmm, well for the local server, it turns out this question is totally
academic. GTK / Cairo crash & burn if you try to run them in a BGR
pixel format
Error: Cairo does not yet support the requested image format:
Depth: 16
Alpha mask: 0x00000000
Red mask: 0x0000001f
Green mask: 0x000007e0
Blue mask: 0x0000f800
Please file an enhacement request (quoting the above) at:
http://bugs.freedesktop.org/enter_bug.cgi?product=cairo
gnome_segv: cairo-image-surface.c:155: _cairo_format_from_pixman_format: Assertion `NOT_REACHED' failed.
So, merely being able to handle BGR from the remote server is sufficient
for now.
Dan.
--
|=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=|
|=- Perl modules: http://search.cpan.org/~danberr/ -=|
|=- Projects: http://freshmeat.net/~danielpb/ -=|
|=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]