Please enable JavaScript to view this site.

A-Shell Development History

(Windows, ATE) AUI_IMAGE new opcode IMGOP_CAPTURE (10) captures the screen or a window to a file: Syntax:

XCALL AUI, AUI_IMAGE,IMGOP_CAPTURE, handle, status, fspec, comp, winid

The concept is similar to that for IMGOP_ACQUIRE, except that the source of the image is the screen/monitor rather than a scanner.

The parameter sequence and interpretation is also nearly identical to IMGOP_CAPTURE. The main exception is the last parameter (which in IMGOP_CAPTURE specifies the title to put on the scan dialog). Here it identifies the screen option to capture:

winid (string) [in] –

indicates the image source:

Value

Meaning

-2

current A-Shell window or modal dialog (if applicable)

-1

entire screen (primary monitor only)

0

main A-Shell window

0###

arbitrary window or control handle ###

###

id of the AUI control to capture

name

name of the AUI control to capture

 

Note that the -2 and 0 options capture the target window/dialog and anything above it.

The comp parameter supports some additional flags (which are not applicable to IMGOP_CAPTURE):

Flag

Value

Meaning

IMGCF_CLIENT

&h00080000

Capture just the client area of the target window. Else include window border, title bar, menu, etc.

IMGCF_GRAY

&h00100000

Convert captured image to grayscale

All of the following imply grayscale

IMGCF_BI_SCATTER

&h00200000

Convert to bi-level using scatter method

IMGCF_BI_DITHER

&h00400000

Convert to bi-level using dither method

IMGCF_BI_THRESH

&h00800000

Convert to bi-level using threshold method

IMGCF_NEGATE

&h01000000

Negative image (useful with black window bg)

IMGCF_INKSAVER

&h02000000

Save ink by converting most common color to white*

 

*The "ink saver" option attempts to address the common complaint about graphic screen images using up too much printer ink or toner. It analyzes the image to identify the color responsible for the most ink; it then converts that color to white (requiring no ink). Any pixels that were originally white are changed to a light-gray so as to not completely disappear into the background.