ScanPicture Constructor

@JvmOverloads constructor(context: Context, contentUri: Uri, compatMode: Boolean = false)

Loads a page from a content URI, such as one returned by the photo picker.

Parameters

  • context — used to open the URI
  • contentUri — the image to load
  • compatMode — true to keep the stored EXIF orientation rather than applying it

Throws

@JvmOverloads constructor(imageFile: File, compatMode: Boolean = false)

Loads a page from a file.

Parameters

  • imageFile — the image to load
  • compatMode — true to keep the stored EXIF orientation rather than applying it

Throws

@JvmOverloads constructor(assets: AssetManager, path: String, compatMode: Boolean = false)

Loads a page from the application’s assets.

Parameters

  • assets — the asset manager to read through
  • path — the asset path
  • compatMode — true to keep the stored EXIF orientation rather than applying it
@JvmOverloads constructor(bitmap: Bitmap, metadata: Bundle = Bundle.EMPTY)

Creates a page from a bitmap your application already holds.

Parameters

  • bitmap — the image
  • metadata — capture metadata such as device and orientation
constructor(source: ScanPicture)

Creates an independent copy of another page, sharing no native state with it.

Parameters

  • source — the page to copy
Top