ImageProcessor

Builtin general purpose images processor. It can handle both vector and bitmap based graphics.

Internally it uses Java's javax.imageio package with com.twelvemonkeys SPI plugins to extend the functionality to other formats such as WebP and TIFF.

See also

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard

Functions

Link copied to clipboard
open override fun buffer(input: File): BufferedImage

This is when you want the processor to just read a file and return an in memory version. You can then take the return value and do whatever you want with it. By default, it will throw NotImplementedError.

Link copied to clipboard

Checks whether type can be processed by this processor.

Link copied to clipboard
open override fun detectFileType(input: File): FileFormat<BufferedImage>

Tries to detect the FileFormat of input using mediumKey and targetedFormats. This mechanism is thus implemented per basis for each processor.

Link copied to clipboard
open override fun process(input: File, fromType: FileFormat<BufferedImage>?, toType: FileFormat<BufferedImage>, renamerContext: TemplateContext)

Processes input with an optional input file type fromType. If fromType is null, then the implementor should call detectFileType to grab that format.

Link copied to clipboard

Returns the targeted formats provided in Public.MEDIUMS using the internal Processor.mediumKey