Instance Method

copy(colorSpace:)

Creates a copy of a bitmap image, replacing its colorspace.

Declaration

func copy(colorSpace space: CGColorSpace) -> CGImage?

Parameters

colorspace

The destination color space. The number of components in this color space must be the same as the number in the specified image.

Return Value

A new CGImage that is a copy of the image passed as the image parameter but with its color space replaced by that specified by the colorspace parameter. Returns NULL if image is an image mask, or if the number of components of colorspace is not the same as the number of components of the colorspace of image. You are responsible for releasing this object using CGImageRelease.

See Also

Copying an Image

func copy() -> CGImage?

Creates a copy of a bitmap image.