Created
October 29, 2016 16:54
-
-
Save nibasya/99fc6fd07426030a3b697c18ef6e9ff3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CImage img; | |
cv::Mat tmp; | |
int i; | |
size_t matPitch; | |
uchar *pTmpData; | |
BYTE *pImgData; | |
matPitch = tmp.cols*tmp.elemSize(); | |
pTmpData = tmp.data + (img.GetHeight()-1)*matPitch; | |
pImgData = (BYTE*)img.GetBits(); | |
for (i = 0; i < img.GetHeight(); i++, pTmpData -= matPitch, pImgData += img.GetPitch()) | |
memcpy(pTmpData, pImgData, matPitch); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment