Obtain a user downloadable gamma table.
Copy Code
|
|
---|---|
AT_ERRCOUNT ACCUAPI IG_ISIS_drv_read_gamma_file( HISISDRV hDriver, AT_MODE nTag, HWND hWnd ); |
Name | Type | Description |
---|---|---|
hDriver | HISISDRV | The handle to the driver. |
nTag | AT_MODE | Specifies the tag in which to store the downloadable gamma table. For scanners that support downloadable gamma tables, this tag should be set to one of the IG_ISIS_TAG_GAMMA_TABLEn tags. |
hWnd | HWND | A handle to the parent window. |
Returns the number of ImageGear errors that occurred during this function call. If there are no errors, the return value is IGE_SUCCESS.
This function does not process image pixels.
The IG_ISIS_drv_read_gamma_file function prompts the application user for a gamma file and then uses the file data to fill in a downloadable gamma correction table for the scanner.
Before calling IG_ISIS_drv_read_gamma_file, make sure the current scanner supports user downloadable gamma tables by querying the existence of the IG_ISIS_TAG_GAMMA_TABLEn tags. If the scanner supports one downloadable gamma table, then IG_ISIS_TAG_GAMMA_TABLE1 will be available. If the scanner supports more than one gamma table, then there will be n number such tags available.
Use IG_ISIS_drv_read_gamma_file to prompt the application user to choose a gamma file from a File Open dialog, and then set nTag to contain the gamma table read from the file. IG_ISIS_drv_read_gamma_file does not automatically forward the gamma table down to the scanner. If the user then selects to use the downloaded gamma table as a parameter for scanning, call IG_ISIS_drv_send_gammato send the gamma curve data to the scanner hardware.
The function will check for file format validity. However, there is no guarantee that a selected gamma table is valid. If scanning occurs while an invalid gamma correction curve is in use, unpredicatable program behavior may result.
The File Open dialog displayed by IG_ISIS_drv_read_gamma_file will automatically look for files in the current directory that ends in the extension .PXG. However, it can open any ASCII text file that specifies the gamma table using the standard format. See IG_ISIS_TAG_GAMMA_TABLEn for a discussion on the standard gamma correction table format.