DocumentModel
A base class containing images for a scanned document
Last updated
A base class containing images for a scanned document
Last updated
import com.sybrin.identity.models.DocumentModel
public <T extends
DocumentModel
> castToModel (Class<T> class)
Casts the current model to the type specified by the class parameter. The specified type must be a child of DocumentModel.
public Bitmap getCroppedDocumentImage ()
Returns a cropped image of the scanned document.
public String getCroppedDocumentImagePath ()
Returns the file path of the saved cropped document image.
public Bitmap getDocumentImage ()
Returns an image of the scanned document.
public String getDocumentImagePath ()
Returns the file path of the saved document image.
public Bitmap getPortraitImage ()
Returns cropped image of the face found on the scanned document.
public String getPortraitImagePath ()
Returns the file path of the saved portrait image.
public void saveImage (Context context)
Saves all images within the model to the local device and populates all path fields.
Public methods
Data source
<T extends DocumentModel>
N/A
Bitmap
Front of document
String
Local storage
Bitmap
Front of document
String
Local storage
Bitmap
Front of document
String
Local storage
void
saveImages(Context context)
Saves all images within the model
to the local device and populates
all path fields.
N/A
Parameters
class
Class<T>: Type of class the result is being cast to.
Returns
<T extends DocumentModel>
Value is null
if casting was not possible.
Returns
Bitmap
This value cannot be null
.
Returns
String
Value is null
if image was not saved.
Returns
Bitmap
This value cannot be null
.
Returns
String
Value is null
if image was not saved.
Returns
Bitmap
This value cannot be null
.
Returns
String
Value is null
if image was not saved.
Parameters
Context
Value cannot be null
.