Package io.scanbot.sdk.core.processor
Class ImageProcessor
-
- All Implemented Interfaces:
public final class ImageProcessor
Class for applying chains of image processing operations.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enum
ImageProcessor.ImageRotation
Supported image rotation types.
public class
ImageProcessor.Companion
-
Field Summary
Fields Modifier and Type Field Description public final static ImageProcessor.Companion
Companion
-
Constructor Summary
Constructors Constructor Description ImageProcessor(Bitmap bitmap)
ImageProcessor(ByteArray nv21, Integer width, Integer height)
ImageProcessor(ByteArray encodedBytes)
ImageProcessor(ImageProcessor processor)
ImageProcessor(String path)
-
Method Summary
Modifier and Type Method Description final Unit
dispose()
final Unit
applyFilter(ParametricFilter filter)
Process provided image with list of operations. final Unit
crop(List<PointF> polygon)
Crops image to the given bounding box. final Unit
resize(Integer maxSize)
Resizes image to the given size final Unit
rotate(ImageProcessor.ImageRotation rotation)
Rotates image by the given degrees which should be multiple of 90 final Bitmap
processedImage()
Returns processed image. final Boolean
saveProcessedImage(String path)
Saves the processed image. final ByteArray
encodedProcessedImage(String extension)
Returns processed image encoded in the specified format, for example ".jpg". -
-
Method Detail
-
applyFilter
final Unit applyFilter(ParametricFilter filter)
Process provided image with list of operations.
- Parameters:
filter
- filter to apply
-
rotate
final Unit rotate(ImageProcessor.ImageRotation rotation)
Rotates image by the given degrees which should be multiple of 90
-
processedImage
final Bitmap processedImage()
Returns processed image.
-
saveProcessedImage
final Boolean saveProcessedImage(String path)
Saves the processed image.
-
encodedProcessedImage
final ByteArray encodedProcessedImage(String extension)
Returns processed image encoded in the specified format, for example ".jpg". Must include a leading period.
-
-
-
-