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
 TWAIN Acquire
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

AlphaUniform

25 Posts

Posted - Feb 10 2020 :  10:02:14  Show Profile  Reply
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

xequte

4981 Posts

Posted - Feb 11 2020 :  19:55:32  Show Profile  Reply
Hi Alex

Can you generate a log file?

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

Does disabling either of these lines affect it?

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

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

AlphaUniform

25 Posts

Posted - Feb 12 2020 :  08:42:59  Show Profile  Reply
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
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To: