[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gtk-app-devel
Subject:    Re: BGR vs. RGB in GTK/GDK
From:       "John Cupitt" <jcupitt () gmail ! com>
Date:       2007-02-21 6:02:04
Message-ID: 522c6460702202202q7963ba08s3893f91c31179c9f () mail ! gmail ! com
[Download RAW message or body]

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
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic