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
 Problem with ImageEnMView.MIO.SaveToFileTIFF

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
Sidney Egnew Posted - Apr 28 2017 : 16:19:45
Hello,

I was testing capabilities with a production image batch using the ScanAndSaveTIFF demo. The batch was about an inch thick and contained mixed checks, envelopes, and 8 1/2 x 11 paper. It scanned without any issues. We attempted to save the images as a TIFF file using the SaveAs Button. The progress bar stopped moving when it was about 1/3 of a way thru the save according to the progress bar. Windows "End Process" was needed to kill the program.

I copied the SaveButton code to the AllAcquire demo and tested again today.

Scan settings used: "Full Color", 300x300, No Rotation, Feeder Enabled, Auto-Feed, Duplex Enabled, NOT Show Acquisition Dialog, Enable Logging

We tried a different batch of about the same size. The same problem occurred at about the same location. The error occurred in the first half of the batch so we scanned just that. The problem occurred again. We cut that in half so we had to separate quarters of the original batch. The error would not occur with either quarter. When we reassembled and scanned the two quarters the problem recurred as before.

We then changed the settings from full-color to 8-bit Grayscale and scanned. The problem did not occur.

We then scanned over an inch of 8 1/2 x 11 documents with the full color settings. The save problem did not occur.

In every case, the save was to the local hard drive. I created new ietwainlog.txt files each time.

I can't install a scanner application until this problem is resolved. Please advise.

Thanks

============================
Here is the SaveButton code:

procedure TfrmMain.SaveButtonClick(Sender: TObject);
var
  iExtension,AFileName: string;
begin
  if SaveImageEnDialog1.Execute then
  begin
    Screen.Cursor := crHourGlass;
    try
      AFileName := SaveImageEnDialog1.FileName;
      iExtension := ExtractFileExt(AFileName);
      if IEExtToFileFormat(iExtension) = ioTIFF then
        begin
          ImageEnMView1.MIO.SaveToFileTIFF(AFileName);
          if ImageEnMView1.MIO.Aborting then
          begin
            MessageDlg('There was an error saving the image.', mtError, [mbOK], 0);
            exit;
          end;
        end
      else
        MessageDlg('File type must be TIF',mtError,[mbOk],0);
    finally
      Screen.Cursor := crDefault;
    end;
  end;
end;
3   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - May 01 2017 : 19:30:50
Hi Sidney

You may be running into memory issues. You might want to acquire images directly to file rather than adding them to the TImageEnMView:

// Save scanned images directly to file without adding them to a TImageEnMView
procedure TForm1.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 := True;
end;


Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Sidney Egnew Posted - May 01 2017 : 08:17:42
All Scans Full Color at 300x300 full duplex, mixed size paper, many in color
This is what I see having been recorded in the saved tiff files:

Section 1, Save Success, 1,480,394 KB, 60 pages, physical 30 pages
Section 2, Save Success, 1,776,422 KB, 72 pages, physical 36 pages
Section 1+2, Save Failure, 2,097,224 KB, 84 pages saved of 132 pages, physical 66 pages

IETW XferReadyMulti: getting another image" was logged 60 times for section 1
IETW XferReadyMulti: getting another image" was logged 132 times for section 1+2
I did not check the Section 2 log since the expected values were matched in these cases.


xequte Posted - Apr 30 2017 : 00:24:37
Hi Sidney

How many images were in the ImageEnMView?

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com