ImageGear for C and C++ on Windows v20.3 - Updated
IG_ISIS_drv_read_dither_file
API Reference Guide > ISIS Component API Reference > ISIS Component Functions Reference > Driver Communication and Setup Functions > IG_ISIS_drv_read_dither_file

Obtain a user downloadable dither pattern.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_ISIS_drv_read_dither_file(
        HISISDRV hDriver,
        AT_MODE nTag,
        HWND hWnd
);

Arguments:

Name Type Description
hDriver HISISDRV The handle to the driver.
nTag AT_MODE Specifies the tag in which to store the downloadable dither pattern. For scanners that support downloadable dither patterns, this tag should be set to IG_ISIS_TAG_DITHERPATTERN_1 or IG_ISIS_TAG_DITHERPATTERN_2.
hWnd HWND A handle to the parent window.

Return Value:

Returns the number of ImageGear errors that occurred during this function call. If there are no errors, the return value is IGE_SUCCESS.

Supported Raster Image Formats:

This function does not process image pixels.

Remarks:

The IG_ISIS_drv_read_dither_file function prompts the application user for a dither file and then uses the file data to fill in a downloadable dither pattern for the scanner.

Before calling IG_ISIS_drv_read_dither_file, make sure the current scanner supports user downloadable dither patterns by querying the existence of IG_ISIS_TAG_DITHER_PATTERN1 and IG_ISIS_TAG_DITHER_PATTERN2. If the scanner supports one downloadable dither pattern, then IG_ISIS_TAG_DITHER_PATTERN1 will be available. If the scanner supports two patterns, then both tags will be available.

Use IG_ISIS_drv_read_dither_file to prompt the application user to choose a dither file from a File Open dialog, and then set nTag to contain the dither pattern read from the file. IG_ISIS_drv_read_dither_file does not automatically forward the dither pattern down to the scanner. If the user then selects to use the downloaded dither pattern as a parameter for scanning, call IG_ISIS_drv_send_ditherto send the pattern data to the scanner hardware.

The function will check for file format validity. However, there is no guarantee that a selected dither pattern is valid. If scanning occurs while an invalid dither pattern is in use, unpredicatable program behavior may result.

The File Open dialog displayed by IG_ISIS_drv_read_dither_file will automatically look for files in the current directory that ends in the extension .PXH. However, it can open any ASCII text file that specifies the dither pattern using the standard format. See IG_ISIS_TAG_DITHER_PATTERN1 for a discussion on the standard dither pattern format.

See Also:

IG_ISIS_drv_send_dither

IG_ISIS_drv_read_gamma_file

IG_ISIS_drv_send_gamma

IG_ISIS_TAG_DITHER

IG_ISIS_TAG_DITHER_PATTERN1

IG_ISIS_TAG_DITHER_PATTERN2

Is this page helpful?
Yes No
Thanks for your feedback.