[MPlayer-dev-eng] RGBA to ARGB conversion

Ingo Brückl ib at wupperonline.de
Mon Jun 13 13:33:51 CEST 2011


I'm pretty sure there is already a function or macro for the following
problem, but where/which?

I have an unsigned char array of RGB(A) data, i.e. it is either 3 bytes RGB
or 4 bytes RGBA. The data must be converted to ARGB, i.e. on big-endian the
resulting array must be ARGB, on little-endian BGRA.

No problem writing such a converting routine, but if there is already a
solution, I'd rather use it.

Ingo


More information about the MPlayer-dev-eng mailing list