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
 TIEWia.SetItemPropertyQuestion (Win64)

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
suriyont Posted - May 07 2015 : 17:55:03
System: Win 7 Pro 64bit
ImageEn: V6.0.1
Delphi: XE6 Pro
Application Platform: Win64

I am trying to programmatically set the color depth on the WIA scan device before scanning (see below)

ImageEnMView1.MIO.AcquireParams.SetSource(ieaWIA, 'HP Photosmart C309a');
ImageEnMView1.MIO.AcquireParams.BitDepth := 1;
//-- or
ImageEnMView1.MIO.WIAParams.SetItemProperty(WIA_IPA_DEPTH, 1);
ImageEnMView1.MIO.Acquire;

However, I am unable to set the bit depth. Either Methods above fails to set the bit depth.

Please Advise.

Thanks

Suri M.
5   L A T E S T    R E P L I E S    (Newest First)
suriyont Posted - May 08 2015 : 10:55:57
Ok, I think I figure it out from your demo. With WIA api, you can only set WIA_IPA_DATATYPE. This property will then changes the BitDepth accordingly:

//-- 0 = b/w format
ImageEnView1.IO.WIAParams.SetItemProperty(WIA_IPA_DATATYPE, 0);
ImageEnView1.IO.Acquire;


Thanks,


Suri M.
suriyont Posted - May 08 2015 : 07:52:26
Hi Nigel,

Yes, BitDepth is set to 1 after the Acquire if I set to B/W from the dialog.

ImageEnView1.IO.AcquireParams.SetSource(ieaWIA, 'HP Photosmart C309a');
ImageEnView1.IO.AcquireParams.VisibleDialog := True;
ImageEnView1.IO.Acquire;
ShowMessage(Format('Bitdepth: %d',[ImageEnView1.IO.AcquireParams.BitDepth]));






Suri M.
xequte Posted - May 07 2015 : 22:02:06
Hi Suri

I'm afraid that is not quite the same. When you enable VisibleDialog and call Acquire the driver handles the communication between the configuration dialog and the device without involving ImageEn.

OOI, is BitDepth set after calling Acquire?

To confirm whether the issue is in ImageEn use another library to set WIA_IPA_DEPTH and then modelessly acquire.


Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
suriyont Posted - May 07 2015 : 21:07:44
Thanks for a quick reply. What puzzling me is that I can set it through the WIA common dialog:

ImageEnMView1.MIO.AcquireParams.SetSource(ieaWIA, 'HP Photosmart C309a');
ImageEnMView1.MIO.AcquireParams.VisibleDialog := True;
ImageEnMView1.MIO.Acquire;

Via dialog I can change the bit depth (set to b/w scan). Somehow within your TIEWia.ShowAcquireDialog(), you are able to set this property.

Thanks,

Suri M.
xequte Posted - May 07 2015 : 19:09:15
Hi Suri

I expect your Twain device/driver does not support the property.


Nigel
Xequte Software
www.xequte.com
nigel@xequte.com