Type Method

imageWithCGImage:

Creates and returns an image object representing the specified Quartz image.

Declaration

+ (UIImage *)imageWithCGImage:(CGImageRef)cgImage;

Parameters

cgImage

The Quartz image object.

Return Value

A new image object for the specified Quartz image, or nil if the method could not initialize the image from the specified image reference.

Discussion

This method does not cache the image object. You can use the methods of the Core Graphics framework to create a Quartz image reference.

See Also

Creating and Initializing Image Objects

+ imageWithContentsOfFile:

Creates and returns an image object by loading the image data from the file at the specified path.

+ imageWithData:

Creates and returns an image object that uses the specified image data.

+ imageWithData:scale:

Creates and returns an image object that uses the specified image data and scale factor.

+ imageWithCGImage:scale:orientation:

Creates and returns an image object with the specified scale and orientation factors.

+ imageWithCIImage:

Creates and returns an image object that contains a Core Image object.

+ imageWithCIImage:scale:orientation:

Creates and returns an image object based on a Core Image object and the specified attributes.

- initWithContentsOfFile:

Initializes and returns the image object with the contents of the specified file.

- initWithData:

Initializes and returns the image object with the specified data.

- initWithData:scale:

Initializes and returns the image object with the specified data and scale factor.

- initWithCGImage:

Initializes and returns the image object with the specified Quartz image reference.

- initWithCGImage:scale:orientation:

Initializes and returns an image object with the specified scale and orientation factors

- initWithCIImage:

Initializes and returns an image object with the specified Core Image object.

- initWithCIImage:scale:orientation:

Initializes and returns an image object with the specified Core Image object and properties.