提交 48af5e55 编写于 作者: M Maksim Shabunin

Merge pull request #7202 from valeriyvan:fixUIImageToMat

...@@ -100,7 +100,7 @@ void UIImageToMat(const UIImage* image, ...@@ -100,7 +100,7 @@ void UIImageToMat(const UIImage* image,
CGFloat cols = image.size.width, rows = image.size.height; CGFloat cols = image.size.width, rows = image.size.height;
CGContextRef contextRef; CGContextRef contextRef;
CGBitmapInfo bitmapInfo = kCGImageAlphaPremultipliedLast; CGBitmapInfo bitmapInfo = kCGImageAlphaPremultipliedLast;
if (CGColorSpaceGetModel(colorSpace) == 0) if (CGColorSpaceGetModel(colorSpace) == kCGColorSpaceModelMonochrome)
{ {
m.create(rows, cols, CV_8UC1); // 8 bits per component, 1 channel m.create(rows, cols, CV_8UC1); // 8 bits per component, 1 channel
bitmapInfo = kCGImageAlphaNone; bitmapInfo = kCGImageAlphaNone;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册