1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 00:03:03 +04:00

Merge pull request #18855 from Rightpoint:feature/colejd/add-apple-conversions-to-framework-builds

Expose CGImage <-> Mat conversion for iOS platforms

* Add apple_conversions to framework builds

This exposes CGImage <-> Mat conversion.

* Export Mat <-> CGImage methods on iOS targets

* Add CGImage converters to iOS objc helper class

* Add CF_RETURNS_RETAINED annotations to methods returning CGImageRef
This commit is contained in:
Jonathan Cole
2020-11-19 16:20:32 -05:00
committed by GitHub
parent 11cfa64a10
commit c4c9cdd2b1
7 changed files with 25 additions and 4 deletions
@@ -50,6 +50,8 @@
//! @addtogroup imgcodecs_ios
//! @{
CV_EXPORTS CGImageRef MatToCGImage(const cv::Mat& image) CF_RETURNS_RETAINED;
CV_EXPORTS void CGImageToMat(const CGImageRef image, cv::Mat& m, bool alphaExist = false);
CV_EXPORTS UIImage* MatToUIImage(const cv::Mat& image);
CV_EXPORTS void UIImageToMat(const UIImage* image,
cv::Mat& m, bool alphaExist = false);
@@ -12,7 +12,7 @@
//! @addtogroup imgcodecs_macosx
//! @{
CV_EXPORTS CGImageRef MatToCGImage(const cv::Mat& image);
CV_EXPORTS CGImageRef MatToCGImage(const cv::Mat& image) CF_RETURNS_RETAINED;
CV_EXPORTS void CGImageToMat(const CGImageRef image, cv::Mat& m, bool alphaExist = false);
CV_EXPORTS NSImage* MatToNSImage(const cv::Mat& image);
CV_EXPORTS void NSImageToMat(const NSImage* image, cv::Mat& m, bool alphaExist = false);