mirror of
https://github.com/opencv/opencv.git
synced 2025-08-06 06:26:29 +08:00
fixed copy-paste errors
This commit is contained in:
parent
d647261de2
commit
125782c061
@ -67,8 +67,8 @@ UIImage* MatToUIImage(const cv::Mat& image) {
|
|||||||
CGDataProviderCreateWithCFData((__bridge CFDataRef)data);
|
CGDataProviderCreateWithCFData((__bridge CFDataRef)data);
|
||||||
|
|
||||||
// Preserve alpha transparency, if exists
|
// Preserve alpha transparency, if exists
|
||||||
bool alpha = cvMat.channels() == 4;
|
bool alpha = image.channels() == 4;
|
||||||
CGBitmapInfo bitMapInfo = (alpha ? kCGImageAlphaLast : kCGImageAlphaNone) | kCGBitmapByteOrderDefault;
|
CGBitmapInfo bitmapInfo = (alpha ? kCGImageAlphaLast : kCGImageAlphaNone) | kCGBitmapByteOrderDefault;
|
||||||
|
|
||||||
// Creating CGImage from cv::Mat
|
// Creating CGImage from cv::Mat
|
||||||
CGImageRef imageRef = CGImageCreate(image.cols,
|
CGImageRef imageRef = CGImageCreate(image.cols,
|
||||||
|
Loading…
Reference in New Issue
Block a user