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
 Extra empty area after scan
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

Pawel

Poland
33 Posts

Posted - Jun 28 2016 :  05:17:48  Show Profile  Reply
After every scan I get an image with an extra empty area at the bottom (look at image)



How do I scan:
with ImageEnMView1.MIO do
begin
AcquireParams.VisibleDialog := False
AcquireParams.AutoFeed :=True
AcquireParams.FeederEnabled := True

AcquireParams.DuplexEnabled := True
TwainParams.AutoDiscardBlankPages := -1
TwainParams.YResolution.CurrentValue := 300;
TwainParams.XResolution.CurrentValue := 300;
TwainParams.PixelType.CurrentValue := 0
end;

if not Acquire() then
   begin
          showmesage('ERROR');
          AcquireClose();
          Exit();
   end;



And then images save to disk and load:

for I := 0 to ImageEnMView1.ImageCount - 1 do
           begin

               ImageEnMView1ImageSelect(nil,I);
               ImageEnVect1.IO.Params.JPEG_ColorSpace := ioJPEG_YCbCr;
               ImageEnVect1.IO.Params.JPEG_Quality := 85;
               ImageEnVect1.IO.Params.JPEG_Progressive := True;
               ImageEnVect1.IO.SaveToFileJpeg(path);

               ImageEnMView1.DeleteImage(I);
               ImageEnMView1.InsertImage(I);
               ImageEnMView1.SetImageFromFile(path);
           end;


I'd like to know, why the empty area is and how to set to get a jpg image exactly A4 size?

xequte

38615 Posts

Posted - Jun 28 2016 :  19:42:21  Show Profile  Reply
Hmm, that is odd. Have you tried setting PhysicalWidth and PhysicalHeight?

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

Pawel

Poland
33 Posts

Posted - Jun 29 2016 :  02:18:22  Show Profile  Reply
I've checked PhysicalWidth and PhysicalHeight and they are ok (8,27 x 11,69 inc)
But, the problem does not occur, when I scan with scanner dialog (there on start is set some other page size), and I need to set A4 page, so I added one line
TWainParams.StandardSize.CurrentValue := IETW_A4
but it did not help. :(

P.S. The problem does occur only when scan with feeder.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: