SessionFilterVignette

open class SessionFilterVignette : SessionFilter

Original Image Filtered Image

Applying the filter to an image:

let vignetteFilter = SessionFilterVignette()
vignetteFilter.normalizedIntensity = 75
session.image!.filters = [vignetteFilter]

Applying the filter to a whole video:

let vignetteFilter = SessionFilterVignette()
vignetteFilter.normalizedIntensity = 75
session.video!.filters = [vignetteFilter]

Applying the filter to the first segment of a video:

let vignetteFilter = SessionFilterVignette()
vignetteFilter.normalizedIntensity = 75
session.video!.videoSegments.first!.filters = [vignetteFilter]

For more information about filters visit the super class SessionFilter.

Settings

  • The color of the vignette.

    Default value: .black

    Declaration

    Swift

    public var color: UIColor { get set }
  • The center of the vignette in normalized coordinates.

    Default value: CGPoint(x: 0.5, y: 0.5)

    Declaration

    Swift

    public var center: CGPoint { get set }
  • The normalized distance from the center where the vignette effect starts.

    Default value: 0.3

    Declaration

    Swift

    public var start: Double { get set }
  • end

    The normalized distance from the center where the vignette effect ends.

    Default value: 0.8

    Declaration

    Swift

    public var end: Double { get set }