public protocol ImageProcessor
ImageProcessor would be used to convert some downloaded data to an image.
Types Conforming to
Represents a processor based on a
Filter. It requires a filter to create an
The default processor. It converts the input data to a valid image. Images of .PNG, .JPEG and .GIF format are supported. If an image item is given as
DefaultImageProcessorwill do nothing on it and return the associated image.
Processor for adding an blend mode to images. Only CG-based images are supported.
Processor for adding an compositing operation to images. Only CG-based images are supported in macOS.
Processor for making round corner images. Only CG-based images are supported in macOS, if a non-CG image passed in, the processor will do nothing.
Processor for resizing images. If you need to resize a data represented image to a smaller size, use
DownsamplingImageProcessorinstead, which is more efficient and uses less memory.
Processor for adding blur effect to images.
Accelerate.frameworkis used underhood for a better performance. A simulated Gaussian blur with specified blur radius will be applied.
Processor for adding an overlay to images. Only CG-based images are supported in macOS.
Processor for tint images with color. Only CG-based images are supported.
Processor for applying some color control to images. Only CG-based images are supported. watchOS is not supported.
Processor for applying black and white effect to images. Only CG-based images are supported. watchOS is not supported.
Processor for cropping an image. Only CG-based images are supported. watchOS is not supported.
Processor for downsampling an image. Compared to
ResizingImageProcessor, this processor does not render the images to resize. Instead, it downsamples the input data directly to an image. It is a more efficient than
ResizingImageProcessor. Prefer to use
DownsamplingImageProcessoras possible as you can than the
ImageProcessor to another. The identifier of the new
will be "(self.identifier)|>(another.identifier)".
ImageProcessor will process the image in the order of the two processors concatenated.
var identifier: String
Identifier of the processor. It will be used to identify the processor when caching and retrieving an image. You might want to make sure that processors with same properties/functionality have the same identifiers, so correct processed images could be retrieved with proper key.
Processes the input
ImageProcessItem with this processor.
Input item which will be processed by
The parsed options when processing the item.
The processed image.