Date
Dec. 22nd, 2024
 
2024年 11月 22日

Post: NSImage: Get size in pixels

NSImage: Get size in pixels

Published 12:04 Apr 22, 2016.

Created by @ezra. Categorized in #Programming, and tagged as #macOS.

Source format: Markdown

Table of Content

Just simple:

let rep = originImage.representations.first
let pixelSize = CGSize(width: (rep?.pixelsWide)!, height: (rep?.pixelsHigh)!)
Pinned Message
HOTODOGO
The Founder and CEO of Infeca Technology.
Developer, Designer, Blogger.
Big fan of Apple, Love of colour.
Feel free to contact me.
反曲点科技创始人和首席执行官。
开发、设计与写作皆为所长。
热爱苹果、钟情色彩。
随时恭候 垂询