exposureAdjust()
Adjusts an image’s exposure.
Declaration
class func exposureAdjust() -> any CIFilter & CIExposureAdjustReturn 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:
evA
floatrepresenting the amount to adjust the exposure as an NSNumber.inputImageAn 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]