LoginSignup
0
0

More than 1 year has passed since last update.

UIImageのメモリ上のサイズを取得する

Last updated at Posted at 2021-06-24

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

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0