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
 TWAIN Acquire

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
AlphaUniform Posted - Feb 10 2020 : 10:02:14
Hi there,
I'm using IE 8.7.6 and want to acquire images via TWAIN.
Here is what I'm doing:

TImageEnMIO *imgIO (member object);


imgIO->TwainParams->VisibleDialog = true;
	imgIO->TwainParams->ProgressIndicators = false;
	if(!imgIO->SetAcquireSource(this->pTWAINInfo->SelectedAPI, this->pTWAINInfo->DriverName))
	 {
		this->SetUIState(ERROR_STATE, "error.....");
		return;
	 }
	this->SetUIState(READY_STATE, "ready...");
	

	if(!imgIO->Acquire())
	 {
		 this->SetUIState(ERROR_STATE, "error...");
		 return;
	 }
//success
Close();


Bitmap event:

void __fastcall TfmMainTWAIN::imgIOAcquireBitmap(TObject *Sender, TIEBitmap *ABitmap,
          int DpiX, int DpiY, bool &Handled)
{
	/*
here is the code to save the bitmap to file
*/
	this->iPicCount++;
	Handled = true;
}


When I run the program, everything is fine, I get the bitmap, I save it to file, but
imgIO->Acquire()
always return false.
Can anyone tell me what I'm doing wrong? Should imgIO->Acquire() not return true?

Confused :)

Best regards
Alex
2   L A T E S T    R E P L I E S    (Newest First)
AlphaUniform Posted - Feb 12 2020 : 08:42:59
Hi Nigel,
thank you very much.

Removing Handled=true did the trick (thought I already tried this )

I enabled the logfile, but there is nothing more than just one line:
"Twain log. Core version 8.7.6 21-11-2019 * 32 bit"

I think this is ok?!

Best regards
Alex
xequte Posted - Feb 11 2020 : 19:55:32
Hi Alex

Can you generate a log file?

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

Does disabling either of these lines affect it?

imgIO->TwainParams->VisibleDialog = true;
Handled = true;

Nigel
Xequte Software
www.imageen.com