premultiplyingAlpha()
Returns a new image created by multiplying the image’s RGB values by its alpha values.
Declaration
func premultiplyingAlpha() -> CIImageReturn 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
applyingFilter(_:parameters:)applyingFilter(_:)transformed(by:)transformed(by:highQualityDownsample:)cropped(to:)oriented(forExifOrientation:)clampedToExtent()clamped(to:)composited(over:)convertingWorkingSpaceToLab()convertingLabToWorkingSpace()matchedToWorkingSpace(from:)matchedFromWorkingSpace(to:)unpremultiplyingAlpha()settingAlphaOne(in:)