src/gfxlib2/gfx_image_convert.c
/* Caller is expected to hold FB_GRAPHICSLOCK() */
Caller is expected to hold FB_GRAPHICSLOCK()
Caller is expected to hold FB_GRAPHICSLOCK ()
void fb_image_convert_8to32(const unsigned char *src, unsigned char *dest, int w)
{
	int r, g, b;
	unsigned int *d = (unsigned int *)dest;
	for (; w; w--) {
		r = __fb_gfx->device_palette[*src] & 0xFF;
		g = (__fb_gfx->device_palette[*src] >> 8) & 0xFF;
		b = (__fb_gfx->device_palette[*src] >> 16) & 0xFF;
		*d++ = 0xFF000000 | b | (g << 8) | (r << 16);
		src++;
	}
}
void fb_image_convert_8to32 ( const unsigned char * src , unsigned char * dest , int w ) { int r , g , b ; unsigned int * d = ( unsigned int * ) dest ; for ( ; w ; w -- ) { r = __fb_gfx -> device_palette [ * src ] & 0xFF ; g = ( __fb_gfx -> device_palette [ * src ] >> 8 ) & 0xFF ; b = ( __fb_gfx -> device_palette [ * src ] >> 16 ) & 0xFF ; * d ++ = 0xFF000000 | b | ( g << 8 ) | ( r << 16 ) ; src ++ ; } }
Caller is expected to hold FB_GRAPHICSLOCK()
Caller is expected to hold FB_GRAPHICSLOCK ()