xRay()
Alters an image to make it look like an X-ray image.
Declaration
class func xRay() -> any CIFilter & CIXRayReturn 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:
inputImageAn 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]