edgeWork()
Produces a black-and-white image that looks similar to a woodblock print.
Declaration
class func edgeWork() -> any CIFilter & CIEdgeWorkReturn Value
The modified image.
Discussion
This method applies the edge work filter to an image. The effect creates a stylized black-and-white rendition of the image that looks similar to a woodblock print.
The edge work filter uses the following properties:
inputImageAn image with the type CIImage.
radiusA
floatrepresenting the area of effect as an NSNumber.
The following code creates a filter that results in a monochrome image with the edges of objects highlighted:
func edgeWork(inputImage: CIImage) -> CIImage {
let edgeWorkFilter = CIFilter.edgeWork()
edgeWorkFilter.inputImage = inputImage
edgeWorkFilter.radius = 4
return edgeWorkFilter.outputImage!
}[Image]