![]() |
Accusoft USB Scanner SDK
|
This interface provides methods to manipulate and save scanned images. More...
Inherited by ScanImage.
Public Member Functions | |
| ScanError | createBitmapALPHA_8 () |
| Create an Android Bitmap with the same width and height as this image, but with ALPHA_8 format. | |
| ScanError | createBitmapARGB_8888 () |
| Create an Android Bitmap with the same width and height as this image, but with ARGB_8888 format. | |
| ScanError | createBitmapRGB_565 () |
| Create an Android Bitmap with the same width and height as this image, but with RGB_565 format. | |
| Bitmap | getBitmap () |
| Return a reference to the most-recently created Bitmap for this image. | |
| int | getBitsPerPixel () |
| Obtain the number of bits per pixel in the image. | |
| int | getBytesPerLine () |
| Obtain the number of bytes per row (line) in the image. | |
| int | getNumCols () |
| Obtain the number of columns in the image. | |
| int | getNumRows () |
| Obtain the number of rows (lines) in the image. | |
| int | getResolution () |
| Obtain the resolution of the bitmap, measured in pixels per meter. | |
| void | release () |
| Release the memory containing image data. | |
| IScanImage | resizeImage (int numCols, int numRows) throws ScanException |
| Create a new image from an existing image, resizing it to the specified width and height. | |
| IScanImage | rotateImage (int rotation) throws ScanException |
| Construct a new image by rotating the image data of an existing image. | |
| ScanError | toBitmapFile (String filename) |
| Save the image to a file in Windows Bitmap format with no compression. | |
| ScanError | toJPEGFile (String filename) |
| Save the image to a file in JPEG format. | |
| ScanError | toPDFFile (String filename) |
| Save the image to a file in PDF format. | |
| ScanError | toTIFFFile (String filename) |
| Save the image to a file in TIFF format. | |
This interface provides methods to manipulate and save scanned images.
| ScanError createBitmapALPHA_8 | ( | ) |
Create an Android Bitmap with the same width and height as this image, but with ALPHA_8 format.
A reference to the Bitmap will be stored in this image, and can be retrieved with a call to getBitmap().
| ScanException |
| ScanError createBitmapARGB_8888 | ( | ) |
Create an Android Bitmap with the same width and height as this image, but with ARGB_8888 format.
A reference to the Bitmap will be stored in this image, and can be retrieved with a call to getBitmap().
| ScanException |
| ScanError createBitmapRGB_565 | ( | ) |
Create an Android Bitmap with the same width and height as this image, but with RGB_565 format.
A reference to the Bitmap will be stored in this image, and can be retrieved with a call to getBitmap().
| ScanException |
| Bitmap getBitmap | ( | ) |
Return a reference to the most-recently created Bitmap for this image.
See createBitmapALPHA_8(), createBitmapARGB_8888(), and createBitmapRGB_565();
| int getBitsPerPixel | ( | ) |
Obtain the number of bits per pixel in the image.
| int getBytesPerLine | ( | ) |
Obtain the number of bytes per row (line) in the image.
| int getNumCols | ( | ) |
Obtain the number of columns in the image.
| int getNumRows | ( | ) |
Obtain the number of rows (lines) in the image.
| int getResolution | ( | ) |
Obtain the resolution of the bitmap, measured in pixels per meter.
| void release | ( | ) |
Release the memory containing image data.
This is useful when a more direct approach to memory management is needed, instead of relying solely upon garbage collection. Native (non-JVM) memory will be released, and this object's reference to its Android Bitmap (if it had one) will be cleared. This object's other methods should not be called after release();
| IScanImage resizeImage | ( | int | numCols, |
| int | numRows | ||
| ) | throws ScanException |
Create a new image from an existing image, resizing it to the specified width and height.
The pixel depth of the original is preserved.
| numCols | The width of the new image, measured in pixels. |
| numRows | The height of the new image, measured in pixels. |
| ScanException |
| IScanImage rotateImage | ( | int | rotation | ) | throws ScanException |
Construct a new image by rotating the image data of an existing image.
The pixel depth of the original is preserved.
| rotation | How many 90* increments to rotate by (Counter-clockwise) |
| ScanException |
| ScanError toBitmapFile | ( | String | filename | ) |
Save the image to a file in Windows Bitmap format with no compression.
| filename | The file name into which the image will be saved. |
| ScanError toJPEGFile | ( | String | filename | ) |
Save the image to a file in JPEG format.
The image will be saved with high quality and only minor compression.
| filename | The file name into which the image will be saved. |
| ScanError toPDFFile | ( | String | filename | ) |
Save the image to a file in PDF format.
The image will be slightly compressed with a JPEG encoder, providing a high quality image.
| filename | The file name into which the image will be saved. |
| ScanError toTIFFFile | ( | String | filename | ) |
Save the image to a file in TIFF format.
Images with a 1 bit-per-pixel depth are compressed using CCITT 64 encoding, while images with other pixel depths are not compressed.
| filename | The file name into which the image will be saved. |