AUI_IMAGE scanning enhancement: you can now set the scanner pixel type and resolution from the application by using the second thru fourth bytes of the comp parameter:
xcall AUI, AUI_IMAGE, IMGOP_ACQUIRE, handle, status, filespec, attribs ,appname {,pages, scanflags}}
where attribs replaces the previous comp parameter and is defined as:
map1 attribs,b,4 ! compress, pixel type, resolution attributes |
map1 attribsx,@attribs ! overlay to break out fields
map2 comp,b,1 ! compression options (as before)
map2 pixtype,b,1 ! pixel type: (see below)
map2 resx,b,1 ! x resolution (in multiples of 25 DPI)
map2 resy,b,1 ! y resolution (in multiples of 25 DIP)
The pixtype options are shown in the following table. The first three of these are standard for most scanners, the others are somewhat exotic and may not be supported.
Value |
Definition |
---|---|
1 |
Black and white (bi-level) |
2 |
Grayscale (8 bit) |
3 |
RGG (24 bit) |
4 |
Palette |
5 |
CMY |
6 |
CMYK |
7 |
YUV |
8 |
YUVK |
9 |
CIEXYZ |
The resx and resy fields are scaled to multiples of 25 DPI (i.e. 12=300 DPI), in order to fit a reasonable range of possible resolutions in 8 bits.
For each of the pixtype, resx, and resy fields, 0 is interpreted as no change to the existing or default settings. So existing programs that pass only the old comp value will continue to work as before.
Note that for many scanners, setting the pixel type and resolution options may not have an effect unless the IMGSF_HIDEUI flag is set in the scanflags parameter. That is, displaying the scanner's user interface may override the application settings with the scanner's own previously saved settings.