Atalasoft MobileImage API Reference
Public Member Functions | List of all members
com.kofax.mobile.sdk.capture.ContextImageStorage Class Reference
Inheritance diagram for com.kofax.mobile.sdk.capture.ContextImageStorage:
com.kofax.mobile.sdk.capture.IImageStorage

Public Member Functions

 ContextImageStorage ()
 
void setImage (Bitmap image, String id)
 
Bitmap getImage (String id)
 
Bitmap removeImage (String id)
 

Detailed Description

An implementation of IImageStorage that uses a static hashmap to store images. It is important to note that memory leaks will occur if images stored here are not properly recycled, and references cleared as soon as possible.

Constructor & Destructor Documentation

com.kofax.mobile.sdk.capture.ContextImageStorage.ContextImageStorage ( )
inline

Member Function Documentation

Bitmap com.kofax.mobile.sdk.capture.ContextImageStorage.getImage ( String  id)
inline

Get a reference to an image of the given Id. This implementation returns a direct reference to image in memory. Calling Bitmap#recycle() will recycle the bitmap for all references.

Parameters
idThe id of the image to retrieve
Returns
A bitmap, or null if the image of the given id does not exist in storage

Implements com.kofax.mobile.sdk.capture.IImageStorage.

Bitmap com.kofax.mobile.sdk.capture.ContextImageStorage.removeImage ( String  id)
inline

Retrieves and removes the image of the given id from storage. The returned image must be recycled by the caller

Parameters
idThe id of the image to remove from storage
Returns
The image associated with the specified id or null if no image for the specified id was found

Implements com.kofax.mobile.sdk.capture.IImageStorage.

void com.kofax.mobile.sdk.capture.ContextImageStorage.setImage ( Bitmap  image,
String  id 
)
inline

Store or overwrite an image with the given Id. Null is a valid value.

Parameters
imageThe image to store
idThe id of the image when storing, for later retrieval

Implements com.kofax.mobile.sdk.capture.IImageStorage.


The documentation for this class was generated from the following file:
Untitled Document © 2016 Atalasoft, Inc., 116 Pleasant St, Suite 321, Easthampton, MA 01027, U.S.A. All rights reserved. Use is subject to license terms.