Initializes and returns an image object using the provided image data.
- macOS 10.0+
The data object containing the image data. The data can be in any format that macOS supports, including PDF, PICT, EPS, or any number of bitmap data formats.
NSImage object or
nil if the method cannot create an image representation from the contents of the specified data object.
Use this method in cases where you already have image data in a supported format and want to obtain an
NSImage object that represents that data. This method initializes the object with an image representation that is most appropriate for the type of data you provided.