Contents

edgeWork()

Produces a black-and-white image that looks similar to a woodblock print.

Declaration

class func edgeWork() -> any CIFilter & CIEdgeWork

Return 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:

inputImage

An image with the type CIImage.

radius

A float representing 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]

See Also

Filters