Author |
Topic |
|
LeoFong
Hong Kong
4 Posts |
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.
|
|
xequte
38610 Posts |
|
LeoFong
Hong Kong
4 Posts |
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'. |
|
|
w2m
USA
1990 Posts |
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
Hong Kong
4 Posts |
Posted - Jan 30 2019 : 11:15:08
|
@Bill
Yes, it works! Thanks. Now my only problem is how to discard blank pages. |
|
|
xequte
38610 Posts |
|
|
Topic |
|