ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 How to clear frame selection crated in the Twain interface dialog ?
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

mastinf

Italy
46 Posts

Posted - Feb 19 2025 :  08:32:29  Show Profile  Reply
Hello,

This is the situation:

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 ?

thanks

Roberto

ImageEn 12.5.0

Roberto Nicchi
Master Informatica
Italy

xequte

38899 Posts

Posted - Feb 20 2025 :  13:33:59  Show Profile  Reply
Hi Roberto

You can use:

https://www.imageen.com/help/TIETwainParams.SetDefaultParams.html

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

mastinf

Italy
46 Posts

Posted - Feb 22 2025 :  07:15:30  Show Profile  Reply
Hello,

I have just tried to execute the following code

img.IO.TwainParams.SetDefaultParams();
img.io.TwainParams.VisibleDialog:=false;
img.IO.Acquire;


but it didn't help. I miss something?

thanks

Roberto

Roberto Nicchi
Master Informatica
Italy
Go to Top of Page

mastinf

Italy
46 Posts

Posted - Feb 22 2025 :  07:35:50  Show Profile  Reply
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;

Roberto Nicchi
Master Informatica
Italy
Go to Top of Page

xequte

38899 Posts

Posted - Feb 23 2025 :  16:11:04  Show Profile  Reply
Hi Roberto

Sorry, I'm not following AcquireFrameEnabled := True, should make the scanner use a selection, not prevent it.



Nigel
Xequte Software
www.imageen.com
Go to Top of Page

mastinf

Italy
46 Posts

Posted - Feb 26 2025 :  09:44:52  Show Profile  Reply
Hello,

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.


Roberto Nicchi
Master Informatica
Italy
Go to Top of Page

mastinf

Italy
46 Posts

Posted - Feb 26 2025 :  10:11:14  Show Profile  Reply
Try with the TwainDemo https://www.imageen.com/files/demos/run/ImageAcquisition/Twain/TwainDemo.exe

Do a first scan activating "Scanner Dialog Visible"

Do a selection and acquire the image.

Deactivate "Scanner Dialog Visible" and repeat acquire. Here i get again that frame selected before and not the full frame.

Roberto Nicchi
Master Informatica
Italy
Go to Top of Page

xequte

38899 Posts

Posted - Feb 26 2025 :  21:16:10  Show Profile  Reply
Thanks Roberto, we'll look into that.



Nigel
Xequte Software
www.imageen.com
Go to Top of Page

xequte

38899 Posts

Posted - Mar 19 2025 :  23:49:27  Show Profile  Reply
Hi Roberto

Please try the following option in next week's release:

IEGlobalSettings().TwainCompatibilityOptions := IEGlobalSettings().TwainCompatibilityOptions + [ ietcExplicitAcquireFrame ];

Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: