These functions will probably not be used very often. Most optimizers aren't interested in the images or the raw scans, but if you do need them, here they are.
◆ jsGetImage()
Requests and reads an image.
- Parameters
-
jc | The connection to read the image from. |
image | Where the image is stored. |
- Returns
- 0 on success.
-
INVALID_PARAMETER
if jc
or image
is NULL
.
-
SCANNER_FAILURE
on all connection failures.
◆ jsGetImagePixel()
int jsGetImagePixel |
( |
jsImage const *const |
image, |
|
|
size_t const |
x, |
|
|
size_t const |
y |
|
) |
| |
Returns a pixel value from an image.
This function checks to ensure that image
isn't NULL
, but doesn't do any error checking to ensure that x
and y
are within bounds.
(0, 0)
is the upper-left pixel. (image->numberHorizontal - 1, image->numberVertical - 1)
is the lower-right pixel.
- Parameters
-
image | The image to get a pixel value from. |
x | The x coordinate of the pixel to get. |
y | The y coordinate of the pixel to get. |
- Returns
- The greyscale pixel value in the range of 0 to 255.
-
0 if
image
is NULL
.
◆ jsGetImageScan()
Requests and reads an image and scan.
- Parameters
-
jc | The connection to read the image and scan from. |
image | Where the image is stored. |
scan | Where the scan is stored. |
- Returns
- 0 on success.
-
INVALID_PARAMETER
if jc
or scan
is NULL
.
-
SCANNER_FAILURE
on all connection failures.
◆ jsGetScan()
Requests and reads a scan.
- Parameters
-
jc | The connection to read the scan from. |
scan | Where the scan is stored. |
- Returns
- 0 on success.
-
INVALID_PARAMETER
if jc
or scan
is NULL
.
-
SCANNER_FAILURE
on all connection failures.
May not be called while the scanner is in Synchronized Scanning Mode.