Swift 5:
let image = UIImage(named: "test")
if let cgImage = image?.cgImage {
let size = cgImage.height * cgImage.bytesPerRow;
print(size)
}
参考にした記事
https://stackoverflow.com/questions/25483931/ios-get-uiimage-memory-size
Go to list of users who liked
More than 3 years have passed since last update.
Swift 5:
let image = UIImage(named: "test")
if let cgImage = image?.cgImage {
let size = cgImage.height * cgImage.bytesPerRow;
print(size)
}
参考にした記事
https://stackoverflow.com/questions/25483931/ios-get-uiimage-memory-size
Register as a new user and use Qiita more conveniently
Go to list of users who liked