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
 Scanning using TImageEnMView and uploading images to the server over the interne
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

Flashcqxg

138 Posts

Posted - Dec 26 2025 :  07:41:19  Show Profile  Reply
I use TImageEnMView for bulk scanning and upload the scanned images to the server over the internet. The following issue occurs:
At the beginning of the scanning process, the speed is relatively normal. However, as the number of scanned images increases, the scanning speed gradually slows down. After the scanning is completed, it also takes a long time for the scanner to stop completely. I wonder if there are any good solutions to this problem?
My code is as follows:

procedure TScan.ImageEnMViewAcquireBitmap(Sender: TObject; ABitmap: TIEBitmap; DpiX, DpiY: Integer; var Handled: Boolean);
begin
  // Upload to the server. Each image takes about 2 seconds.
  UpLoadImage(ABitmap);
end;

xequte

39297 Posts

Posted - Dec 26 2025 :  18:46:17  Show Profile  Reply
Hi

So the slowness occurs in ImageEn's scanning, i.e. the time of ImageEnMViewAcquireBitmap being called is longer and longer (And our UploadImage method remains constant)?


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

Flashcqxg

138 Posts

Posted - Dec 26 2025 :  21:56:36  Show Profile  Reply
Yes, that's correct. This is because the time it takes to call the UploadImage method is always between 1 and 2 seconds.
Go to Top of Page

xequte

39297 Posts

Posted - Dec 27 2025 :  14:58:52  Show Profile  Reply
Hi

If the images are large and you are filling up the TImageEnMView then there could be slowness due to memory or disk access. If you set Handled to true in your AcquireBitmap method does the slowness go away?



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

Flashcqxg

138 Posts

Posted - Dec 27 2025 :  19:32:31  Show Profile  Reply
I have already placed Handled := True after UpLoadImage(ABitmap), but it is still slow.
Later, I conducted another test. In the OnAcquireBitmap event, I wrote only the following code. When you scan more than 10 pages, you can observe the scenario I described. I believe the UpLoadImage method is blocking the scanning process.

procedure TScan.ImageEnMViewAcquireBitmap(Sender: TObject; ABitmap: TIEBitmap; DpiX, DpiY: Integer; var Handled: Boolean);
begin
sleep(2000);
end;
Go to Top of Page

xequte

39297 Posts

Posted - Dec 29 2025 :  14:38:10  Show Profile  Reply
Hmm, if the scanner does not like the delay, then you should perform your upload asynchronously (non-blocking), e.g. by doing it in a secondary thread.

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

Flashcqxg

138 Posts

Posted - Dec 29 2025 :  17:59:51  Show Profile  Reply
Thank you! Additionally, I've noticed an issue: when calling ABitmap.Rotate(180) in the OnAcquireBitmap event, the larger the image or the poorer the computer's performance, the longer it takes. Is there any way to resolve this?
Go to Top of Page

xequte

39297 Posts

Posted - Jan 02 2026 :  19:45:38  Show Profile  Reply
Hi

It will be much faster if you call ABitmap.Rotate( 180, ierNone );

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

Flashcqxg

138 Posts

Posted - Jan 03 2026 :  19:26:28  Show Profile  Reply
Thanks.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: