Contents

premultiplyingAlpha()

Returns a new image created by multiplying the image’s RGB values by its alpha values.

Declaration

func premultiplyingAlpha() -> CIImage

Return Value

An image object representing the result of the operation.

Discussion

Premultiplied alpha speeds up the rendering of images, so Core Image filters require that input image data be premultiplied. If you have an image without premultiplied alpha that you want to feed into a filter, use this method before applying the filter.

See Also

Creating an Image by Modifying an Existing Image