ImageEn, unit ietwain

TIETwainParams.Orientation

TIETwainParams.Orientation


Declaration

property Orientation: TIEIntegerList;


Description

Defines the orientation of the output image. Not all scanners support this capability.

Valid values are:
Value Description
Twain_Orientation_NoRotate (0) No rotation (Portrait)
Twain_Orientation_Rotate90 (1) Rotate 90
Twain_Orientation_Rotate180 (2) Rotate 180
Twain_Orientation_Rotate270 (3) Rotate 270 (Landscape)
Note: Rotation direction is clockwise

The above values can be assigned to the Orientation.CurrentValue property.
To determine which values your scanner supports, consult the Orientation.Items[] array.

Twain Property: ICAP_ORIENTATION

Note: Use IsCapabilitySupported to detemine if this capability is supported by the current scanner


Example

// Acquire image in landscape orientation (if supported)
ImageEnView1.IO.TwainParams.Orientation.CurrentValue := 3;
ImageEnView1.IO.TwainParams.VisibleDialog := False;
ImageEnView1.IO.Acquire();

// As above, but control if landscape is supported
if ImageEnView1.IO.TwainParams.Orientation.IndexOf(3)=3 then
begin
  ImageEnView1.IO.TwainParams.Orientation.CurrentValue := 3;
  ImageEnView1.IO.TwainParams.VisibleDialog := False;
  ImageEnView1.IO.Acquire();
end
else
  ShowMessage('landscape isn't supported');