Open anonym24 opened 6 years ago
import UIKit import SwiftEyes class ViewController: UIViewController { @IBOutlet weak var imgView: UIImageView! override func viewDidLoad() { super.viewDidLoad() let image = UIImage(named: "img2") imgView.image = image print("Size of UIImage: \(image!.size.height) \(image!.size.width)") let mat = OCVMat(image: image!) print("Size of Mat: \(mat.rows) \(mat.cols)") } }
Output:
Size of UIImage: 128.0 128.0 Size of Mat: 490496 24576
on different macos and real device (ipad)
same image returns:
Size of UIImage: 128.0 128.0 Size of Mat: 0 286334977
what is going on?
Output: