addRepresentations(_:)
Adds an array of image representation objects to the image.
Declaration
func addRepresentations(_ imageReps: [NSImageRep])Parameters
- imageReps:
An array of
NSImageRepobjects.
Discussion
After invoking this method, you may need to explicitly set features of the new image representations, such as their size, number of colors, and so on. This is true particularly when the NSImage object has multiple image representations to choose from. See NSImageRep and its subclasses for the methods you use to complete initialization.
Representations added by this method are retained by the receiver. Image representations cannot be shared among multiple NSImage objects.