Package io.scanbot.sdk.core.processor
Class ImageProcessor
-
- All Implemented Interfaces:
public final class ImageProcessorClass for applying chains of image processing operations.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enumImageProcessor.ImageRotationSupported image rotation types.
public classImageProcessor.Companion
-
Field Summary
Fields Modifier and Type Field Description public final static ImageProcessor.CompanionCompanion
-
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 Unitdispose()final UnitapplyFilter(ParametricFilter filter)Process provided image with list of operations. final Unitcrop(List<PointF> polygon)Crops image to the given bounding box. final Unitresize(Integer maxSize)Resizes image to the given size final Unitrotate(ImageProcessor.ImageRotation rotation)Rotates image by the given degrees which should be multiple of 90 final BitmapprocessedImage()Returns processed image. final BooleansaveProcessedImage(String path)Saves the processed image. final ByteArrayencodedProcessedImage(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.
-
-
-
-