Instance Method

initWithBitmapData:bytesPerRow:size:format:colorSpace:

Initializes an image object with bitmap data.

Declaration

- (instancetype)initWithBitmapData:(NSData *)data bytesPerRow:(size_t)bytesPerRow size:(CGSize)size format:(CIFormat)format colorSpace:(CGColorSpaceRef)colorSpace;

Parameters

d

The bitmap data to use for the image. The data you supply must be premultiplied.

bpr

The number of bytes per row.

size

The size of the image data.

f

A pixel format constant. See Pixel Formats.

c

The color space that the image is defined in. It must be a Quartz 2D color space (CGColorSpaceRef). Pass nil for images that don’t contain color data (such as elevation maps, normal vector maps, and sampled function tables).

Return Value

The initialized image object.

See Also

Initializing an Image

- initWithColor:

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

- 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:

Initializes an image object with the supplied image data.

- 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