the first image is acquired using the scanner interface:
img.io.TwainParams.VisibleDialog:=true;
in the scanner interface the user do a selection and acquires a partial frame.
Then next image acqusition is made without the scanner interface
img.io.TwainParams.VisibleDialog:=false;
In the second acquisition unfortunaltely it's still used the selection made in the scanner interface. Is it possible to clear the selection created in the scanner interface by code ?
Ok i have found the solution looking into a demo application:
img.IO.TwainParams.SetDefaultParams; <--- This doesn't help img.io.TwainParams.AcquireFrameEnabled:=true; <---This line and the next one solve the problem img.IO.TwainParams.Update; img.io.TwainParams.VisibleDialog:=false; img.IO.Acquire;
If AcquireFrameEnabled is set to false the acquire procedure continue to get the frame selected in the twain interface
If AcquireFrameEnabled is set to true i see that the UPDATE procedure set AcquireFrameTop,Left,Right and Bottom with the corrent values to get the full frame.