图像翻转

来源:互联网 发布:订货系统源码 编辑:程序博客网 时间:2024/04/27 09:07

图像上下翻转,就是像素行最上面的放到最先面,就是说像素行的上下翻转;


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;

}

0 0
原创粉丝点击