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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Imageen + wia + acquireframeenabled = Wrong acquisition

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
mastinf Posted - Feb 28 2025 : 10:32:23
I don't have problems with TWAIN drivers but now i have to compile 64bit my application and so have to use WIA driver.

I use this code to set the frame and acquire it:

img.IO.AcquireParams.VisibleDialog:=false; // img is a TImageEnView
img.IO.AcquireParams.AcquireFrameEnabled:= true;
img.IO.AcquireParams.AcquireFrameLeft:= x;
img.IO.AcquireParams.AcquireFrameTop:= y;
img.IO.AcquireParams.AcquireFrameRight:= r;
img.IO.AcquireParams.AcquireFrameBottom:= b;
img.IO.Acquire;


The frame acquired is not correct: a different area is acquired.

The odd thing is that if, after the value has been set, i check in the debugger the value of AcquireFrameRight and AcquireFrameBottom i see that it's 0

Bug or what ?

ImageEn Ver. 13.7.0 and Delphi 10.2.3

Roberto Nicchi
Master Informatica
Italy
4   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Mar 06 2025 : 15:50:42
Hi Roberto

Sorry, I can get neither to work correctly on my test scanners. Please email me for the latest beta which has improved some WIA methods, including setting the acquire rect (though I can only confirm that it should adhere to the "standard").

Nigel
Xequte Software
www.imageen.com
mastinf Posted - Mar 03 2025 : 11:16:20
I have just tried with an HP scanner (WIA procol) and the image acquired corresponds perfectly to the selected frame if SetItemProperty is used. Using Acquireparams doesn't returns the correct image selected.

Roberto Nicchi
Master Informatica
Italy
mastinf Posted - Mar 03 2025 : 10:45:41
I have tried with the Scan WIA scanner app and i have much better result. Anyway yhe acquisition lack a bit of precision: the acquired image is not exactly the image frame selected. The twain acquisition is better.

I have created a demo app. There a re two buttons: one acquire the image using settings stored in AcquireParams. The ther one is specific for WIA and use SetItemProperty.

I have not been able to use AcquireParams and WIA. The acquired image is most of the time differenmt from the selected frame. Doesn't internally AcquireParams use SetItemProperty when the protocol is WIA ?

If you can let me know if my code used in the demo app is correct.

attach/mastinf/202533103918_ScanDemo.zip
58.4 KB

Roberto Nicchi
Master Informatica
Italy
xequte Posted - Feb 28 2025 : 19:29:39
Hi Roberto

Ensure that you are not resetting the values before the acquire, e.g. by re-connecting to the device.

Otherwise it's possible the scanner does not support that via the WIA interface. Can you try setting the properties manually using this demo:

attach/xequte/2025228192934_WIAScanner.zip
19.4 KB

Nigel
Xequte Software
www.imageen.com