图像上下翻转,就是像素行最上面的放到最先面,就是说像素行的上下翻转;
unsingd char * RGB_Flip(unsigned char * pbuf, int w, int h, int len )
{
unsingd char * pFlipBuf = new unsingd char [ len ];
for ( int i = 0; i<h; i++ )
{
int copylen = w*3;
memcpy( pFlipBuf + len -0 -(copylen*i), pbuf + (copylen*i), copylen );
}
returen * pFlipBuf;
}