Commit 48af5e55 authored by Maksim Shabunin's avatar Maksim Shabunin

Merge pull request #7202 from valeriyvan:fixUIImageToMat

parents c16f96cb 464d289f
......@@ -100,7 +100,7 @@ void UIImageToMat(const UIImage* image,
CGFloat cols = image.size.width, rows = image.size.height;
CGContextRef contextRef;
CGBitmapInfo bitmapInfo = kCGImageAlphaPremultipliedLast;
if (CGColorSpaceGetModel(colorSpace) == 0)
if (CGColorSpaceGetModel(colorSpace) == kCGColorSpaceModelMonochrome)
{
m.create(rows, cols, CV_8UC1); // 8 bits per component, 1 channel
bitmapInfo = kCGImageAlphaNone;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment