Contents

sepiaTone()

Adjusts an image’s colors to shades of brown.

Declaration

class func sepiaTone() -> any CIFilter & CISepiaTone

Mentioned in

Return Value

The modified image.

Discussion

This method applies the sepia tone filter to an image. The effect maps the colors of the inputImage to various shades of brown.

The sepia tone filter uses the following property:

inputImage

An image with the type CIImage.

The following code creates a filter that results in the input image transforming to a brown hue:

func sepiaTone(inputImage: CIImage ) -> CIImage {
    let sepiaToneFilter = CIFilter.sepiaTone()
    sepiaToneFilter.inputImage = inputImage
    sepiaToneFilter.intensity = 1
    return sepiaToneFilter.outputImage!
}

[Image]

See Also

Color Effect Filters