JCam DLL API Reference
Scan and Image Data

Functions

int jsGetImage (JCONNECTION const jc, jsImage *const image)
 Requests and reads an image. More...
 
int jsGetScan (JCONNECTION const jc, jsScan *const scan)
 Requests and reads a scan. More...
 
int jsGetImageScan (JCONNECTION const jc, jsImage *const image, jsScan *const scan)
 Requests and reads an image and scan. More...
 
int jsGetImagePixel (jsImage const *const image, size_t const x, size_t const y)
 Returns a pixel value from an image. More...
 

Detailed Description

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.

Function Documentation

◆ jsGetImage()

int jsGetImage ( JCONNECTION const  jc,
jsImage *const  image 
)

Requests and reads an image.

Parameters
jcThe connection to read the image from.
imageWhere 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
imageThe image to get a pixel value from.
xThe x coordinate of the pixel to get.
yThe 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()

int jsGetImageScan ( JCONNECTION const  jc,
jsImage *const  image,
jsScan *const  scan 
)

Requests and reads an image and scan.

Parameters
jcThe connection to read the image and scan from.
imageWhere the image is stored.
scanWhere the scan is stored.
Returns
0 on success.
INVALID_PARAMETER if jc or scan is NULL.
SCANNER_FAILURE on all connection failures.

◆ jsGetScan()

int jsGetScan ( JCONNECTION const  jc,
jsScan *const  scan 
)

Requests and reads a scan.

Parameters
jcThe connection to read the scan from.
scanWhere 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.