representation(using:properties:)
Formats the bitmap representation’s image data using the specified storage type and properties and returns it in a data object.
Declaration
func representation(using storageType: NSBitmapImageRep.FileType, properties: [NSBitmapImageRep.PropertyKey : Any]) -> Data?Parameters
- storageType:
A constant that specifies a file type for bitmap images. It can be Nsbmpfiletype, Nsgiffiletype, Nsjpegfiletype, Nspngfiletype, or Nstifffiletype.
- properties:
A dictionary that contains key-value pairs specifying image properties. These string constants used as keys and the valid values are described in Propertykey.
Return Value
A data object containing the receiver’s image data in the specified format. You can write this data to a file or use it to create a new NSBitmapImageRep object.