The macros RGB()/RGBA() should be changed to BGR()/BGRA()

Forum for discussion about the documentation project.
Post Reply
D.J.Peters
Posts: 8586
Joined: May 28, 2005 3:28
Contact:

The macros RGB()/RGBA() should be changed to BGR()/BGRA()

Post by D.J.Peters »

The macros RGB()/RGBA() should be changed to BGR()/BGRA() (in future) the returned value is BGR/BGRA

FBGFX is an BGR render system not RGB.

I notice it more than once if you mix FBGFX with Windows / Linux video capturing/playback or if you use FBGFX with wxWidget, IUP, GTK+ or FLTK.

In all cases you have to swap the red and blue channel to be compatible to the RGB color space.

Joshy
Tourist Trap
Posts: 2958
Joined: Jun 02, 2015 16:24

Re: The macros RGB()/RGBA() should be changed to BGR()/BGRA(

Post by Tourist Trap »

Have you noticed this remark :
RGB
(documentation)
Note for Windows API programmers: The macro named RGB in the Windows references has been renamed BGR in the FB headers for Windows to avoid collisions.
Post Reply