Instance Method

initWithData:

Initializes a newly allocated NSBitmapImageRep from the provided data.

Declaration

- (instancetype)initWithData:(NSData *)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

+ imageRepWithData:

Creates and returns an NSBitmapImageRep object initialized with the first image in the supplied data.

+ imageRepsWithData:

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

- initWithBitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bitmapFormat:bytesPerRow:bitsPerPixel:

Initializes the receiver, a newly allocated NSBitmapImageRep object, so it can render the specified image.

- initWithBitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bytesPerRow:bitsPerPixel:

Initializes the receiver, a newly allocated NSBitmapImageRep object, so it can render the specified image.

- initWithCGImage:

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

- initWithCIImage:

Returns an NSBitmapImageRep object created from a Core Image object.

- initWithFocusedViewRect:

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

Deprecated
- initForIncrementalLoad

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