|
Kofax Mobile SDK API Reference
|
Public Member Functions | |
| ContextImageStorage () | |
| void | setImage (Bitmap image, String id) |
| Bitmap | getImage (String id) |
| Bitmap | removeImage (String id) |
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.
| Bitmap getImage | ( | String | id | ) |
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.
| id | The id of the image to retrieve |
Implements IImageStorage.
| Bitmap removeImage | ( | String | id | ) |
Retrieves and removes the image of the given id from storage. The returned image must be recycled by the caller
| id | The id of the image to remove from storage |
null if no image for the specified id was found Implements IImageStorage.
| void setImage | ( | Bitmap | image, |
| String | id | ||
| ) |
Store or overwrite an image with the given Id. Null is a valid value.
| image | The image to store |
| id | The id of the image when storing, for later retrieval |
Implements IImageStorage.