comparison postproc/rgb2rgb.c @ 6614:49eac73d0e07

fixing rgb24tobgr32
author michael
date Sun, 30 Jun 2002 19:04:02 +0000
parents 50b5d8367318
children 1df24fd752d0
comparison
equal deleted inserted replaced
6613:5cf616a755ac 6614:49eac73d0e07
444 } 444 }
445 445
446 void rgb24tobgr32(const uint8_t *src, uint8_t *dst, unsigned int src_size) 446 void rgb24tobgr32(const uint8_t *src, uint8_t *dst, unsigned int src_size)
447 { 447 {
448 unsigned i; 448 unsigned i;
449 unsigned num_pixels = src_size >> 2; 449 for(i=0; 3*i<src_size; i++)
450 for(i=0; i<num_pixels; i++)
451 { 450 {
452 dst[4*i + 0] = src[3*i + 2]; 451 dst[4*i + 0] = src[3*i + 2];
453 dst[4*i + 1] = src[3*i + 1]; 452 dst[4*i + 1] = src[3*i + 1];
454 dst[4*i + 2] = src[3*i + 0]; 453 dst[4*i + 2] = src[3*i + 0];
455 dst[4*i + 3] = 0; 454 dst[4*i + 3] = 0;