ImageProcessor

Class for applying chains of image processing operations on the single Image.

Constructors

Link copied to clipboard
constructor(bitmap: Bitmap)
constructor(nv21: ByteArray, width: Int, height: Int, orientation: ImageRotation = ImageRotation.NONE)
constructor(jpeg: ByteArray)
constructor(imagePath: String)
constructor(imageRef: ImageRef)
constructor()

Functions

Link copied to clipboard

Applies filter to the image.

Link copied to clipboard
fun crop(polygon: List<PointF>): ImageProcessor

Crops the image to the given polygon.

Link copied to clipboard
open override fun dispose()

Calling this method will clear native buffer for ImageProcessor. It will be recreated if it will be called again

Link copied to clipboard
fun encodedProcessedImage(encodeImageOptions: EncodeImageOptions = EncodeImageOptions.default()): Result<ByteArray>

Returns encoded processed image as Result.

Link copied to clipboard

Returns processed image.

Link copied to clipboard

Returns processed image.

Link copied to clipboard
fun resize(maxSize: Int): ImageProcessor

Resizes image to the given size.

Link copied to clipboard

Rotates the given image.

fun rotate(degrees: Int): ImageProcessor

Rotates the given image clockwise.

Link copied to clipboard
fun saveProcessedImage(path: String, saveImageOptions: SaveImageOptions = SaveImageOptions.default()): Result<Unit>

Saves processed image to the given path.