# HG changeset patch # User reimar # Date 1178123902 0 # Node ID 1009d14500d1b08c683e02dccf6bfb396489514e # Parent 0e32cc1dda927f98a6a5484e5d6294f6f591f9f2 Simplify bgr2rgb diff -r 0e32cc1dda92 -r 1009d14500d1 gui/bitmap.c --- a/gui/bitmap.c Wed May 02 16:26:58 2007 +0000 +++ b/gui/bitmap.c Wed May 02 16:38:22 2007 +0000 @@ -93,15 +93,10 @@ static void bgr2rgb( txSample * bf ) { - unsigned char c; int i; for ( i=0;i < (int)bf->ImageSize;i+=4 ) - { - c=bf->Image[i]; - bf->Image[i]=bf->Image[i+2]; - bf->Image[i+2]=c; - } + FFSWAP(uint8_t, bf->Image[i], bf->Image[i+2]); } static void Normalize( txSample * bf )