Initializes and returns an image object with the specified dimensions.
- macOS 10.0+
The size of the image, measured in points.
NSImage object with no rendered content.
This method does not add any image representations to the image object. It is permissible to initialize the image object by passing a size of
(0; however, you must set the size to a non-zero value before using it or an exception will be raised.
After using this method to initialize an image object, you are expected to provide the image contents before trying to draw the image. You might lock focus on the image and draw to the image or you might explicitly add an image representation that you created.