Contents

xRay()

Alters an image to make it look like an X-ray image.

Declaration

class func xRay() -> any CIFilter & CIXRay

Return Value

The modified image.

Discussion

This method applies a preconfigured set of effects that imitate a photo being scanned by an X-ray.

The X-ray filter uses the following properties:

inputImage

An image with the type CIImage.

The following code creates a filter that adds an X-ray effect to the input image:

func xRay(inputImage: CIImage ) -> CIImage {
    let xRayFilter = CIFilter.xRay()
    xRayFilter.inputImage = inputImage
    return xRayFilter.outputImage!
}

[Image]

See Also

Color Effect Filters