JoeScan
  home
our story
news  and events
contact us
    our products
how it works
applications support service

Scan and Image Data


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.


Functions

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

Function Documentation

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

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.

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

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.

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

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.

JCAM_DLL_API int STDCALL 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.