GaussianBlur

public struct GaussianBlur: Filter

Spreads source pixels by an amount specified by a Gaussian distribution.

let logo = Image("logo")
logo.apply(GaussianBlur())
canvas.add(logo)
  • The name of the Core Image filter.

    Declaration

    Swift

    public let filterName = "CIGaussianBlur"
  • The radius of the blur. Defaults to 10.0

    Declaration

    Swift

    public var radius: Double
  • Initializes a new filter - parameter radius: a Double value

    Declaration

    Swift

    public init(radius: Double = 5.0) { self.radius = radius }

    Parameters

    radius

    a Double value

  • Applies the properties of the receiver to create a new CIFilter object

    Declaration

    Swift

    public func createCoreImageFilter(inputImage: CIImage) -> CIFilter

    Parameters

    inputImage

    The image to use as input to the filter.

    Return Value

    The new CIFilter object.