Instance Method

initWithData:

Initializes an image object with the supplied image data.

Declaration

- (instancetype)initWithData:(NSData *)data;

Parameters

data

The image data. The data you supply must be premultiplied.

Return Value

The initialized image object, or nil if the object could not be initialized.

See Also

Initializing an Image

- initWithColor:

Initializes an image of infinite extent whose entire content is the specified color.

- initWithBitmapData:bytesPerRow:size:format:colorSpace:

Initializes an image object with bitmap data.

- initWithCGImage:

Initializes an image object with a Quartz 2D image.

- initWithCGImage:options:

Initializes an image object with a Quartz 2D image, using the specified options.

- initWithBitmapImageRep:

Initializes an image object with the specified bitmap image representation.

- initWithImage:

Initializes an image object with the specified UIKit image object.

- initWithImage:options:

Initializes an image object with the specified UIKit image object, using the specified options.

- initWithCGLayer:

Initializes an image object from the contents supplied by a CGLayer object.

Deprecated
- initWithCGLayer:options:

Initializes an image object from the contents supplied by a CGLayer object, using the specified options.

Deprecated
- initWithContentsOfURL:

Initializes an image object by reading an image from a URL.

- initWithContentsOfURL:options:

Initializes an image object by reading an image from a URL, using the specified options.

- initWithCVImageBuffer:

Initializes an image object from the contents of a Core Video image buffer.

- initWithCVImageBuffer:options:

Initializes an image object from the contents of a Core Video image buffer, using the specified options.

- initWithCVPixelBuffer:

Initializes an image object from the contents of a Core Video pixel buffer.

- initWithCVPixelBuffer:options:

Initializes an image object from the contents of a Core Video pixel buffer using the specified options.

- initWithData:options:

Initializes an image object with the supplied image data, using the specified options.

- initWithImageProvider:size::format:colorSpace:options:

Initializes an image object with data provided by an image provider, using the specified options.

kCIImageProviderTileSize

A key for the image tiles size. The associated value is an NSArray that containsNSNumber objects for the dimensions of the image tiles requested from the image provider.

kCIImageProviderUserInfo

A key for data needed by the image provider. The associated value is an object that contains the needed data.

- initWithTexture:size:flipped:colorSpace:

Initializes an image object with data supplied by an OpenGL texture.

Deprecated
- initWithTexture:size:flipped:options:

Initializes an image object with data supplied by an OpenGL texture.

Deprecated
- initWithMTLTexture:options:

Initializes an image object with data supplied by a Metal texture.

- initWithIOSurface:

Initializes an image with the contents of an IOSurface.

- initWithIOSurface:options:

Initializes, using the specified options, an image with the contents of an IOSurface.

- initWithIOSurface:plane:format:options:

Initializes, using the specified format and options, an image with the contents of a specific data plane in an IOSurface.

Deprecated