Initializes and returns an image object using the contents of a Core Graphics image.
SDK
- macOS 10.6+
Framework
- App
Kit
Declaration
Parameters
cgImage
The source
CGImage
.size
The size of the new image. If
size
isNSZero
, the pixel dimensions ofSize cg
are assumed as the image’s size.Image
Return Value
An initialized NSImage
object.
Discussion
You should not assume anything about the image, other than that drawing it is equivalent to drawing the CGImage
.
This is not a designated initializer.