mirror of
https://github.com/opencv/opencv.git
synced 2024-11-25 11:40:44 +08:00
Gets rid of magic constant
This commit is contained in:
parent
4e8f8922e2
commit
464d289fa9
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user