/// <summary> /// Converts to NSImage. /// </summary> /// <returns>The NSImage.</returns> public static NSImage ToNSImage(this UMat umat) { using (CGImage cgImage = umat.ToCGImage()) { return(new NSImage(cgImage, new CGSize(cgImage.Width, cgImage.Height))); } }
/// <summary> /// Converts to NSImage. /// </summary> /// <returns>The NSImage.</returns> public static NSImage ToNSImage(this UMat umat) { using (CGImage tmp = umat.ToCGImage()) { return(new NSImage(tmp, new CGSize(tmp.Width, tmp.Height))); } }
/// <summary> /// Converts to UIImage. /// </summary> /// <returns>The UIImage.</returns> public static UIImage ToUIImage(this UMat umat) { using (CGImage tmp = umat.ToCGImage()) { return(UIImage.FromImage(tmp)); } }