sRGBToneCurveToLinear()
Converts the colors in an image from sRGB to linear.
Declaration
class func sRGBToneCurveToLinear() -> any CIFilter & CISRGBToneCurveToLinearReturn Value
The modified image.
Discussion
This method applies the sRGB-tone-curve-to-linear filter to an image. The effect converts an image in sRGB space to linear color space.
The sRGB-tone-curve-to-linear filter uses the following properties:
inputImageAn image with the type CIImage.
The following code creates a filter that converts from sRGB to linear color space.
func sRGBToLinear(inputImage: CIImage) -> CIImage {
let sRGBToLinearFilter = CIFilter.sRGBToneCurveToLinear()
sRGBToLinearFilter.inputImage = inputImage
return sRGBToLinearFilter.outputImage!
}[Image]