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
 Discard blank pages and save JPG while scanning

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
LeoFong Posted - Jan 30 2019 : 01:46:59
Hello everybody.

I use ImageEnMView to acquire sequential images from Koda3000(more than 200 pages).

(1) I would like to discard the blank pages.

ImageEnMView1.MIO.TwainParams.AutoDiscardBlankPages := -1;
ImageEnmView1.mIO.TwainParams.Update;
ImageEnMView1.MIO.Acquire;

No matter what I changed the value, -1, -2 , 0, 60,000 or 200,000, the blank pages are still there.

(2) How can i save the pages into individual JPG file while scanning? Now i can only do it by this way but have to keep waiting till scanning finished (3 mins).

For i:=0 to ImageEnMView1.MIO.IEMBitmap.Count-1 do
begin
ImageEnMView1.MIO.Params[i].JPEG_Quality := 50;
ImageEnMView1.GetImageToFile(i, 'C:\twain\p'+inttostr(i)+'.jpg');
end;

I tried below on the event of OnImageadd, OnImageadded,OnImageloaded in order to save the file once per page being scanned, but nothing happened. If put in Onimagecreated, 'Access violation at address xxxxxxxxx ' error occured.
ImageEnMView1.Mio.Params[idx].JPEG_Quality := 50;
ImageEnMView1.GetImageToFile(idx, 'C:\twain\p'+inttostr(idx)+'.jpg');


Tks.
5   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Jan 30 2019 : 18:18:20
Hi

I'm not sure what to suggest regarding AutoDiscardBlankPages. ImageEn just passes the value to the Twain driver to handle. Pethaps the Kodak software does it differently, e.g. in code.

You can do it in code too using:

https://www.imageen.com/help/TImageEnMView.RemoveBlankPages.html


Nigel
Xequte Software
www.imageen.com
LeoFong Posted - Jan 30 2019 : 11:15:08
@Bill

Yes, it works! Thanks. Now my only problem is how to discard blank pages.
w2m Posted - Jan 30 2019 : 10:57:49
You could use:

ABitmap.ParamsEnabled := True;
ABitmap.Params.JPEG_Quality := 100;
ABitmap.Write('test.jpg');

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
LeoFong Posted - Jan 30 2019 : 10:21:28
Nigel, thanks for you reply.

(1) I am sure the aquisition source must be TWAIN. And the scanner supports 'Discard blank pages' since this function could be done in KODAK SVT(scanning software).

(2) I tried 'ABitmap.Write('xxx.jpg')' in the OnAcquireBitmap event, it worked. One more question, is there any way to control the quality of JPG? Like 'JPEG_Quality := 50'.
xequte Posted - Jan 30 2019 : 04:28:21
Hi

1. Are you sure you are using Twain acquisition and not something else, like WIA?

2. You can save each image after acquisition in the OnAcquireBitmap event.

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

e.g. ABitmap.Write('D:\..');


Nigel
Xequte Software
www.imageen.com