OverlayImageProcessor
public struct OverlayImageProcessor: ImageProcessor
Processor for adding an overlay to images. Only CG-based images are supported in macOS.
-
Identifier of the processor.
Note
See documentation ofImageProcessorprotocol for more.Declaration
Swift
public let identifier: String -
Overlay color will be used to overlay the input image.
Declaration
Swift
public let overlay: Color -
Fraction will be used when overlay the color to image.
Declaration
Swift
public let fraction: CGFloat -
Initialize an
OverlayImageProcessorDeclaration
Swift
public init(overlay: Color, fraction: CGFloat = 0.5)Parameters
overlayOverlay color will be used to overlay the input image.
fractionFraction 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.
-
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
OverlayImageProcessor Structure Reference