ImageEn, unit ieWIA

TIEWia.SetResolution

TIEWia.SetResolution

Declaration

function SetResolution(DpiX, DpiY: Integer; Item: TIEWiaItem = nil): Boolean;

Description

Sets the horizontal and vertical resolution of the scan (WIA_IPS_XRES and WIA_IPS_YRES), and scales the scan frame (WIA_IPS_XPOS, WIA_IPS_YPOS, WIA_IPS_XEXTENT and WIA_IPS_YEXTENT) so that the same area of the scanner bed is scanned.
The scan frame of a WIA device is specified in pixels, so if only the resolution is changed (e.g. using SetItemProperty) the device may scan a different area, e.g. only the top-left part of the page when the resolution is increased.
Pass -1 for DpiX or DpiY to keep the current value. If the device does not support a separate vertical resolution, it follows the horizontal resolution.
If Item is nil, the default item is used.
Returns False if the resolution could not be set.

Note: XResolution and YResolution use this method for WIA devices

Example

// Scan at 300 dpi
ImageEnView1.IO.WIAParams.SetResolution( 300, 300 );
ImageEnView1.IO.Acquire();

See Also

◼SetItemProperty
◼XResolution
◼YResolution