Initializer

init(data:)

Initializes a newly allocated NSBitmapImageRep from the provided data.

Declaration

init?(data: Data)

Parameters

bitmapData

A data object containing image data. The contents of bitmapData can be any supported bitmap format. For TIFF data, the NSBitmapImageRep is initialized from the first header and image data found in bitmapData.

Return Value

Returns an initialized NSBitmapImageRep if the initialization was successful or nil if it was unable to interpret the contents of bitmapData.

See Also

Creating an NSBitmapImageRep Object

class func imageReps(with: Data) -> [NSImageRep]

Creates and returns an array of initialized NSBitmapImageRep objects corresponding to the images in the supplied data.

init(cgImage: CGImage)

Returns an NSBitmapImageRep object created from a Core Graphics image object.

init(ciImage: CIImage)

Returns an NSBitmapImageRep object created from a Core Image object.

init?(focusedViewRect: NSRect)

Initializes the receiver, a newly allocated NSBitmapImageRep object, with bitmap data read from a rendered image.

Deprecated
init(forIncrementalLoad: ())

Initializes and returns the receiver, a newly allocated NSBitmapImageRep object, for incremental loading.