Creates and returns an image representation object using the contents of the specified pasteboard.
- macOS 10.0+
The pasteboard containing the image data.
An initialized instance of an
NSImage subclass, or
nil if the image data could not be read.
If sent to the
NSImage class object, this method returns a newly allocated instance of a subclass of
NSImage initialized with the data in the specified pasteboard. If sent to a subclass of
NSImage that recognizes the data on the pasteboard, it returns an instance of that subclass initialized with that data.
This method returns
nil in any of the following cases:
The message is sent to the
NSImageclass object and there are no subclasses in the
NSImageclass registry that handle data of the type contained in the specified pasteboard.
The message is sent to a subclass of
NSImageand that subclass cannot handle data of the type contained in the specified pasteboard.
NSImagesubclass is unable to initialize itself with the contents of the pasteboard.
NSImage subclass is initialized by creating an
NSData object based on the data the specified pasteboard and passing it to the