Contents

exposureAdjust()

Adjusts an image’s exposure.

Declaration

class func exposureAdjust() -> any CIFilter & CIExposureAdjust

Return Value

The modified image.

Discussion

This method applies the exposure-adjust filter to an image. The effect uses multiplication of color values to simulate the change of exposure within the photo.

The exposure-adjust filter uses the following properties:

ev

A float representing the amount to adjust the exposure as an NSNumber.

inputImage

An image with the type CIImage.

The following code creates a filter that adds brightness to the input image:

func exposureAdjust(inputImage: CIImage) -> CIImage {
    let exposureAdjustFilter = CIFilter.exposureAdjust()
    exposureAdjustFilter.inputImage = inputImage
    exposureAdjustFilter.ev = 2
    return exposureAdjustFilter.outputImage!
}

[Image]

See Also

Filters