//scanning/com.pixelnetica.scanning/ScanPicture

ScanPicture

[androidJvm]
class ScanPicture : ScanningSdkLibrary.Instance

Represents a picture

Constructors

   
ScanPicture [androidJvm]
@JvmOverloads
constructor(context: Context, contentUri: Uri, compatMode: Boolean = false)
Create ScanPicture from content Uri
@JvmOverloads
constructor(imageFile: File, compatMode: Boolean = false)
Load picture from specified
@JvmOverloads
constructor(assets: AssetManager, path: String, compatMode: Boolean = false)
Load picture from assets
@JvmOverloads
constructor(bitmap: Bitmap, metadata: Bundle = Bundle.EMPTY)
Create ScanPicture from external data
constructor(source: ScanPicture)
Deep copy

Types

Name Summary
Companion [androidJvm]
object Companion

Properties

Name Summary
hasImage [androidJvm]
val hasImage: Boolean
Validate picture. In some cases Picture can not contains real image
hasText [androidJvm]
val ScanPicture.hasText: Boolean
Check ScanPicture contains valid text
orientation [androidJvm]
var orientation: ScanOrientation
Current ScanOrientation of the picture Changing orientation don’t rotate picture itself. Only flag will be changed
pageNumber [androidJvm]
var pageNumber: Int
Optional page number to use with ImageWriter
scanText [androidJvm]
var scanText: ScanText
scope [androidJvm]
val scope: ScanCutout
Create expanded cutout used to define entire origin
shadows [androidJvm]
var shadows: Boolean
Image contains contrast areas
size [androidJvm]
val size: Size
Native image size

Functions

Name Summary
createBitmap [androidJvm]
@JvmOverloads
external fun createBitmap(flags: Int = 0, orientation: ScanOrientation = ScanOrientation.Undefined): Bitmap
Extract Bitmap from picture
detectCutout [androidJvm]
external fun detectCutout(): ScanCutout
Observe image and try to find object defined by
detectOrientation [androidJvm]
external fun detectOrientation(detector: ScanDetector): Boolean
display [androidJvm]
fun ScanPicture.display()
read [androidJvm]
@JvmOverloads
external fun read(reader: ScanReader, callback: ScanReader.DisplayCallback? = null)
Recognize with specified ScanReader
rectify [androidJvm]
fun ScanPicture.rectify(cutout: ScanCutout)
A shortcut to call ScanPicture.refine to perform only crop Crop picture without color processing
refine [androidJvm]
external fun refine(features: Iterable<RefineFeature>)
Main processing routine! Perform processing in appliance with specified
resize [androidJvm]
@JvmOverloads
external fun resize(width: Int, height: Int, uniform: Boolean = false)
Scale picture to specified size
resize [androidJvm]
fun ScanPicture.resize(size: Size, uniform: Boolean = false)
Resize picture to specified android.util.Size
withOrientation [androidJvm]
fun ScanPicture.withOrientation(newOrientation: ScanOrientation): ScanPicture
Create new picture with specified
write [androidJvm]
external fun write(stream: OutputStream, packed: Boolean)
Write ScanPicture to output stream
Top