Skip to content

Instantly share code, notes, and snippets.

@yanfeng42
Created July 19, 2021 12:21
Show Gist options
  • Save yanfeng42/f2874b28d8a677ca48bab7158015fa79 to your computer and use it in GitHub Desktop.
Save yanfeng42/f2874b28d8a677ca48bab7158015fa79 to your computer and use it in GitHub Desktop.
计算 png 图对应的 bitmap 图的大小
(define (png-size w h) (* w h 4.0 1/1024))
@yanfeng42
Copy link
Author

  • png 本身是压缩存储的.
  • bitmap 的大小, 会影响 UIImageView 加载时的 内存消耗.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment