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
 HOW to save multiple images on the attached exampl

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
ImageEnSA Posted - Aug 28 2019 : 20:26:27


Hi everyone,

I have a simple problem and I need your help

as in the attachment, I tried to save all scanned pictures as png images. However, when I scan many papers, it only saves one image!!

Please some help

Thanks

attach/ImageEnSA/201982820245_myTwain.zip
2784.67 KB
3   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Aug 29 2019 : 23:08:55
Sorry, I misread your requirements. You are looking to scan a multi-page document and save all pages to a separate file (not looking to scan documents individually and have them automatically saved to file).

TImageEnView cannot scan multiple pages at a time.

You need to use TImageEnMView for that.

Please open the demo:

\Demos\ImageAcquisition\AllAcquire\AllAcquire.dpr

And add this code to the OnAcquireBitmap event:


procedure TfrmMain.ImageEnMView1AcquireBitmap(Sender: TObject; ABitmap:
    TIEBitmap; DpiX, DpiY: Integer; var Handled: Boolean);
var
  filename : string;
begin
  filename := FormatDateTime( 'C:\Scanned Documents\Scan_yymmdd-hhnnss-zzz.jpg', Now );
  ABitmap.Write( filename);
  Handled := False; // Set to true if you don't want image added to ImageEnMView1
end;


Nigel
Xequte Software
www.imageen.com
ImageEnSA Posted - Aug 29 2019 : 20:13:26
I tried to use your code



// Scan multiple images with a TImageEnView
procedure TForm1.ImageEnView1AcquireBitmap(Sender: TObject; ABitmap: TIEBitmap; DpiX, DpiY: Integer; var Handled: Boolean);
var
  filename: string;
begin
  filename := 'C:\Scanned Documents\Scan_' + FormatDateTime( 'yymmdd-hhnnss-zzz', Now ) + '.jpg';
  ABitmap.Write( filename);
end;



But it only saves ONE PAGE!!


May you please give me a complete example?
xequte Posted - Aug 29 2019 : 17:04:03
Hi

A TImageEnView only holds a single image, so to acquire and save multiple images, either:

1. Save images as they are acquired using the OnAcquireBitmap event:

https://www.imageen.com/help/TImageEnView.OnAcquireBitmap.html


// Scan multiple images with a TImageEnView
procedure TForm1.ImageEnView1AcquireBitmap(Sender: TObject; ABitmap: TIEBitmap; DpiX, DpiY: Integer; var Handled: Boolean);
var
  filename: string;
begin
  filename := 'C:\Scanned Documents\Scan_' + FormatDateTime( 'yymmdd-hhnnss-zzz', Now ) + '.jpg';
  ABitmap.Write( filename);
end;


2. Use a TImageEnMView which can hold multiple images, then save each image in turn

Nigel
Xequte Software
www.imageen.com