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
 Basic MIO Image Save
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

FLDelphi

19 Posts

Posted - Apr 26 2017 :  11:48:04  Show Profile  Reply
I'm attempting to do a basic MIO acquire from scanner and saving to disk. In the future I'd like to save to stream, but I thought I'd keep it simple. The problem is, the resulting TIFF files are very small and just a corner of the full page. I thought changing the store type to ietNormal would do the trick, but it's not.

Here's my code


  FImageEnMView := TImageEnMView.Create(nil);
  try
    FImageEnMView.MIO.TwainParams.VisibleDialog := False;
    FImageEnMView.StoreType := ietNormal;
    FImageEnMView.MIO.Acquire;

    for I := 0 to FImageEnMView.ImageCount - 1 do
    begin
      FImageEnMView.GetImageToFile(i, 'C:\Temp\multi' + IntToStr(i) + '.tiff');
    end;
  finally
    FImageEnMView.Free;
  end;



w2m

USA
1990 Posts

Posted - Apr 26 2017 :  12:52:50  Show Profile  Reply
I suspect you are not setting the acquire parameters correctly. Take a look at the Demos\ImageAcquisition\AllAcquire demo for setting the aquireparameters. Until you get comfortable with getting and setting the aquireparameters use the built it twain dialog with FImageEnMView.MIO.TwainParams.VisibleDialog := True;


Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
Go to Top of Page

FLDelphi

19 Posts

Posted - Apr 26 2017 :  12:58:21  Show Profile  Reply
It's funny you mentioned the Dialog.

I took a look through your demos and they are working really well. That gave me hope, and so I copied the code.

It turns out that if VisibleDialog is set to True, it works perfectly.

If VisibleDialog is set to False, the same bit of code results in thumbnails. And when I modify your demo to not show the dialog, it also results in thumbnails.

I'll begin digging around in the aquireparameters.
Go to Top of Page

xequte

38610 Posts

Posted - Apr 30 2017 :  00:21:17  Show Profile  Reply
Hi

What are your settings for:

https://www.imageen.com/help/TIETwainParams.XResolution.html
https://www.imageen.com/help/TIETwainParams.YResolution.html

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: