Re: BGR vs. RGB in GTK/GDK
- From: "John Cupitt" <jcupitt gmail com>
- To: "Mike Melanson" <mike multimedia cx>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: BGR vs. RGB in GTK/GDK
- Date: Wed, 21 Feb 2007 06:02:04 +0000
Hi Mike,
On 2/21/07, Mike Melanson <mike multimedia cx> wrote:
facilities. I'm trying to convert it to use GTK/GDK. This app has always
rendered bitmaps in blue-green-red (BGR) pixel order which, per my
understanding, is the native order that the hardware expects. Now, I am
using gdk_draw_rgb_image()/gdk_draw_rgb_32_image() which clearly states
that it wants data in RGB order.
Is there a facility I am overlooking for rendering the BGR bitmap?
X11 (via the Visual) tells you what order your hardware expects, and
it's up to you to provide it. I guess it was done this way for
performance reasons. The downside is that it's extra effort for every
program to provide images in every possible format, and no one could
test their code properly.
gdk has a very fast RGB->anything system and everything goes through
that. It can be a little slower, but it's much more portable, much
less effort, and actually tested.
John
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]