Kingfisher Documentation

Structure Resizing​Image​Processor

public struct ResizingImageProcessor: ImageProcessor  

Processor for resizing images. If you need to resize a data represented image to a smaller size, use DownsamplingImageProcessor instead, which is more efficient and uses less memory.

%235 ResizingImageProcessor ResizingImageProcessor ImageProcessor ImageProcessor ResizingImageProcessor->ImageProcessor

Conforms To

ImageProcessor

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

Initializers

init(reference​Size:​mode:​)

public init(referenceSize: CGSize, mode: ContentMode = .none)  

Creates a ResizingImageProcessor.

Parameters

reference​Size CGSize

The reference size for resizing operation in point.

mode Content​Mode

Target content mode of output image should be.

Properties

identifier

public let identifier: String

Identifier of the processor.

reference​Size

public let referenceSize: CGSize

The reference size for resizing operation in point.

target​Content​Mode

public let targetContentMode: ContentMode

Target content mode of output image should be. Default is .none.

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.