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
 Program crashing after scanner dialog (sometimes)

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
wskelton3 Posted - Jan 16 2015 : 17:47:15
Delphi XE5, ImageEn 5.0.6, Windows 7, TWAIN drivers

My program works with a variety of scanners but lately I've had trouble with one customer using an HP ScanJet 5000. The program acquires the image displaying the scanner dialog; however, when I click Ok to continue, my application crashes. Here's some of the code used to acquire the image.

procedure TfmScanit.RefreshImages;
begin
if (ImageEnMView1.ImageCount>0) then begin
ImageEnView1.ZoomFilter:=rfFastLinear;
ImageEnMView1.CopyToIEBitmap(ImageEnMView1.SelectedImage, ImageEnView1.IEBitmap );
ImageEnView1.Zoom:=((ImageEnView1.width/ImageEnView1.IEBitmap.Width*100)-3);
ImageEnView1.Update;
end else begin
ImageEnView1.Clear;
lblSize.Caption:='Size=0kb';
end;
end;

procedure TfmScanit.pnlScanitClick(Sender: TObject);
begin
pnlScanit.Color:=clRed;
if (tblScans.recordcount=0) or (not dmSC.IsGraphic(tblScansFileExt.AsString)) then begin
tblScans.Insert;
tblScansScanDate.value:=now();
tblScansScanDesc.value:= 'Scanned image';
tblScansFileExt.value:='TIFF';
tblScansSize.value:=FloatToStrF(TBlobField(tblScans.FieldByName('image')).BlobSize/1000,ffNumber,5,0)+'KB';
tblScans.Post
end;
if (ImageEnMView1.MIO.TWainParams.SelectedSource < 0) then
ImageEnMView1.MIO.SelectAcquireSource();
ImageEnMView1.MIO.AcquireClose;
ImageEnMView1.MIO.TWainParams.FreeResources;
ImageEnMView1.SelectSeek(iskLast);
ImageEnMView1.Deselect; // to append images
Need2Save:=ImageEnMView1.MIO.Acquire;
ImageEnMView1.SelectSeek(iskLast);
RefreshImages;
pnlScanit.Color:=clNavy;
end;

It gets to the Need2Save line and bombs.

Anything you can see that I'm not doing or doing that I don't need to do? I know this is difficult to troubleshoot. Just looking for some direction. When I use TWAIN drivers, it crashes. When I use WIA drivers, it works but the scanner dialog is not robust enough.

Thanks for any help.

Bill
1   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Jan 19 2015 : 12:56:18
Hi Bill

Have you tried updating the firmware on the scanner and updating the drivers?


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