Kingfisher Documentation

Structure Blend​Image​Processor

public struct BlendImageProcessor: ImageProcessor  

Processor for adding an blend mode to images. Only CG-based images are supported.

%243 BlendImageProcessor BlendImageProcessor ImageProcessor ImageProcessor BlendImageProcessor->ImageProcessor

Conforms To

ImageProcessor

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

Initializers

init(blend​Mode:​alpha:​background​Color:​)

public init(blendMode: CGBlendMode, alpha: CGFloat = 1.0, backgroundColor: KFCrossPlatformColor? = nil)  

Creates a BlendImageProcessor.

Parameters

blend​Mode CGBlend​Mode

Blend Mode will be used to blend the input image.

alpha CGFloat

Alpha will be used when blend image. From 0.0 to 1.0. 1.0 means solid image, 0.0 means transparent image (not visible at all). Default is 1.0.

background​Color KFCross​Platform​Color?

Background color to apply for the output image. Default is nil.

Properties

identifier

public let identifier: String

Identifier of the processor.

blend​Mode

public let blendMode: CGBlendMode

Blend Mode will be used to blend the input image.

alpha

public let alpha: CGFloat

Alpha will be used when blend image.

background​Color

public let backgroundColor: KFCrossPlatformColor? 

Background color of the output image. If nil, it will stay transparent.

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.