I\'m trying to get the length of a UIImage. Not the width or height of the image, but the size of the data.
UIImage
Swift 3:
let image = UIImage(named: "example.jpg") if let data = UIImageJPEGRepresentation(image, 1.0) { print("Size: \(data.count) bytes") }