Kingfisher Documentation

Structure Overlay​Image​Processor

public struct OverlayImageProcessor: ImageProcessor  

Processor for adding an overlay to images. Only CG-based images are supported in macOS.

%119 OverlayImageProcessor OverlayImageProcessor ImageProcessor ImageProcessor OverlayImageProcessor->ImageProcessor

Conforms To

ImageProcessor

An ImageProcessor would be used to convert some downloaded data to an image.

Initializers

init(overlay:​fraction:​)

public init(overlay: KFCrossPlatformColor, fraction: CGFloat = 0.5)  

Creates an OverlayImageProcessor

Parameters

overlay KFCross​Platform​Color

Overlay color will be used to overlay the input image.

fraction CGFloat

Fraction will be used when overlay the color to image. From 0.0 to 1.0. 0.0 means solid color, 1.0 means transparent overlay.

Properties

identifier

public let identifier: String

Identifier of the processor.

overlay

public let overlay: KFCrossPlatformColor

Overlay color will be used to overlay the input image.

fraction

public let fraction: CGFloat

Fraction will be used when overlay the color to image.

Methods

process(item:​options:​)

public func process(item: ImageProcessItem, options: KingfisherParsedOptionsInfo) -> KFCrossPlatformImage?  

Processes the input ImageProcessItem with this processor.

Parameters

item Image​Process​Item

Input item which will be processed by self.

options Kingfisher​Parsed​Options​Info

Options when processing the item.

Returns

The processed image.