Blame view

3rdparty/opencv-4.5.4/modules/imgcodecs/misc/objc/macosx/Mat+Converters.h 658 Bytes
f4334277   Hu Chunming   提交3rdparty
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
  //
  //  Mat+Converters.h
  //
  //  Created by Masaya Tsuruta on 2020/10/08.
  //
  
  #pragma once
  
  #ifdef __cplusplus
  #import "opencv2/core.hpp"
  #else
  #define CV_EXPORTS
  #endif
  
  #import "Mat.h"
  #import <Foundation/Foundation.h>
  #import <AppKit/AppKit.h>
  
  NS_ASSUME_NONNULL_BEGIN
  
  CV_EXPORTS @interface Mat (Converters)
  
  -(CGImageRef)toCGImage CF_RETURNS_RETAINED;
  -(instancetype)initWithCGImage:(CGImageRef)image;
  -(instancetype)initWithCGImage:(CGImageRef)image alphaExist:(BOOL)alphaExist;
  -(NSImage*)toNSImage;
  -(instancetype)initWithNSImage:(NSImage*)image;
  -(instancetype)initWithNSImage:(NSImage*)image alphaExist:(BOOL)alphaExist;
  
  @end
  
  NS_ASSUME_NONNULL_END