BlendImageProcessor
public struct BlendImageProcessor: ImageProcessor
Processor for adding an blend mode to images. Only CG-based images are supported.
-
Identifier of the processor.
Note
See documentation ofImageProcessorprotocol for more.Declaration
Swift
public let identifier: String -
Blend Mode will be used to blend the input image.
Declaration
Swift
public let blendMode: CGBlendMode -
Alpha will be used when blend image.
Declaration
Swift
public let alpha: CGFloat -
Background color of the output image. If
nil, it will stay transparent.Declaration
Swift
public let backgroundColor: Color? -
Initialize an
BlendImageProcessorDeclaration
Swift
public init(blendMode: CGBlendMode, alpha: CGFloat = 1.0, backgroundColor: Color? = nil)Parameters
blendModeBlend Mode will be used to blend the input image.
alphaAlpha will be used when blend image. From 0.0 to 1.0. 1.0 means solid image, 0.0 means transparent image. Default is 1.0.
backgroundColorBackgroud color to apply for the output image. Default is
nil. -
Process an input
ImageProcessItemitem to an image for this processor.Note
See documentation of
ImageProcessorprotocol for more.Declaration
Swift
public func process(item: ImageProcessItem, options: KingfisherOptionsInfo) -> Image?Parameters
itemInput item which will be processed by
selfoptionsOptions when processing the item.
Return Value
The processed image.
View on GitHub
Install in Dash
BlendImageProcessor Structure Reference