ImageDocument

A document containing an image.

public class ImageDocument extends GiniVisionDocument

Constructors

ImageDocument
Link copied to clipboard
void ImageDocument(Array<byte> data, Document.Source source, Document.ImportMethod importMethod)

Types

ImageFormat
Link copied to clipboard

Supported image formats.

public enum ImageFormat

Functions

describeContents
Link copied to clipboard
abstract int describeContents()

Internal use only.

int describeContents()
empty
Link copied to clipboard
equals
Link copied to clipboard
boolean equals(Object o)
fromIntent
Link copied to clipboard
fromPhoto
Link copied to clipboard
static ImageDocument fromPhoto(Photo photo)
static ImageDocument fromPhoto(Photo photo, Uri storedAtUri)
fromPhotoAndDocument
Link copied to clipboard
static ImageDocument fromPhotoAndDocument(Photo photo, GiniVisionDocument document)
fromUri
Link copied to clipboard
getData
Link copied to clipboard

The contents of a document, if the document was loaded into memory.

For photos captured with the camera or for QR Codes this is never null.

If isImported is {@code true} then this might be null. If it's null you can use getIntent and access the contents using the Intent.

synchronized Array<byte> getData()
getDeviceOrientation
Link copied to clipboard

Internal use only.

String getDeviceOrientation()
getDeviceType
Link copied to clipboard

Internal use only.

String getDeviceType()
getFormat
Link copied to clipboard

Retrieve the format of the image.

ImageDocument.ImageFormat getFormat()
getId
Link copied to clipboard

Retrieve the document's unique id.

String getId()
getImportMethod
Link copied to clipboard

Retrieve with which method the document has been imported.

Document.ImportMethod getImportMethod()
getIntent
Link copied to clipboard

The Intent with which the imported document was received.

Intent getIntent()
getJpeg
Link copied to clipboard

The image of a document as a JPEG.

Array<byte> getJpeg()
getMimeType
Link copied to clipboard

Retrieve the document's mime type (media type).

String getMimeType()
getParcelableMemoryCacheTag
Link copied to clipboard
String getParcelableMemoryCacheTag()
getRotationDelta
Link copied to clipboard
int getRotationDelta()
getRotationForDisplay
Link copied to clipboard

The amount of clockwise rotation needed to display the image in the correct orientation.

Degrees are positive and multiples of 90.

int getRotationForDisplay()
getSource
Link copied to clipboard

Retrieve from which source the document originates from.

Document.Source getSource()
getType
Link copied to clipboard

Get the concrete document type.

Document.Type getType()
getUri
Link copied to clipboard

The Uri of the imported document.

Uri getUri()
hashCode
Link copied to clipboard
int hashCode()
isImported
Link copied to clipboard

Document is imported if it was picked from another app from the Camera Screen's document upload button or if a file was passed to the Gini Vision Library through the client application from another app.

boolean isImported()
isReviewable
Link copied to clipboard

Documents like PDFs are not reviewable and can be passed directly to the Analysis Screen. Reviewable documents have to be shown in the Review Screen first before passing it on to the Analysis Screen.

boolean isReviewable()
loadData
Link copied to clipboard
synchronized void loadData(Context context, AsyncCallback<Array<byte>, Exceptioncallback)
setData
Link copied to clipboard
synchronized void setData(Array<byte> data)
setParcelableMemoryCacheTag
Link copied to clipboard
void setParcelableMemoryCacheTag(String tag)
setRotationForDisplay
Link copied to clipboard
void setRotationForDisplay(int degrees)
toString
Link copied to clipboard
String toString()
unloadData
Link copied to clipboard
synchronized void unloadData()
updateRotationDeltaBy
Link copied to clipboard
void updateRotationDeltaBy(int degrees)
writeToParcel
Link copied to clipboard
abstract void writeToParcel(Parcel p, int p1)

Internal use only.

void writeToParcel(Parcel dest, int flags)

Properties

CREATOR
Link copied to clipboard

Internal use only.

public final static Parcelable.Creator<ImageDocumentCREATOR