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
 WIA scan from flatbed with TImageEnMView fails

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
Oribi Posted - Dec 13 2020 : 11:36:38
A WIA scan from a flatbed using the TImageEnMView will fail when the MIO.AcquireParams.VisibleDialog is set to false.

iexAcquire.pas contains the following source:

// Allow flatbed scanning via TImageEnMIO
  if fWIAVisibleDialog and bMultiple then
    bMultiple := WIADevicePropertyHasFlag(WIA_DPS_DOCUMENT_HANDLING_SELECT, WIA_FEEDER);


Because of the fWIAVisiableDialog flag, scans from flatbed scanners fail when the VisibleDialog is not set (as in this case bMultiple may be true even though the flatbed does not support this).

After removing this flag I was able to start a scan using a flatbed without first having to select a scanner using a dialog.

A second issue I ran into was an AV in iewia.pas when setting the "Handled" flag to True in the OnAcquireBitmap event.

iewia contains the following source:
if assigned(fMultiCallBack) then
    begin
      fMultiCallBack(ProcessingBitmap, TObject(callbackParams), tmpparams.DpiX, tmpparams.DpiY);
      AssignIO(callbackParams, tmpparams);
    end;


If the handled flag in the fMultiCallBack is set to true the "callbackParams" will be NIL, which results in an AV in the AssignIO().

After modifying the code to
if assigned(fMultiCallBack) then
    begin
      fMultiCallBack(ProcessingBitmap, TObject(callbackParams), tmpparams.DpiX, tmpparams.DpiY);
      if Assigned(callbackParams) then 
        AssignIO(callbackParams, tmpparams);
    end;


I was able to scan.

1   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Dec 14 2020 : 21:53:59
Thank you for the reports. We'll have fixes in the next release.


Nigel
Xequte Software
www.imageen.com