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
 floating point divid by zero tifflt line 4987
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

rswyman@docuxplorer.com

USA
156 Posts

Posted - Aug 13 2012 :  19:39:53  Show Profile  Reply
We are using build 4.1.2 beta with Delphi XE
We use the ImageEnMView component which load a 45 page tiff via
ImageEnMView.LoadFromFileOnDemand(). the exception happens when executing ImageEnMView.MIO.SaveToFileTIFF(_Currentfile),see below. After the exception the ImageEnMView image 1-5 are blank.

if the number of pages is small, say 10 pages there are no issues.

Thanks All...
Ron


procedure TImagEnFrm.ImageAutoCollate(iList:TList<integer>);
var
PagesToMove: Int32;
i: Int32;
MoveTo, PageToMove: Integer;
ImageEnVectTemp: TImageEnVect;
begin
if iList.Count > 0 then begin
ImageEnVectTemp := TImageEnVect.Create(nil);
iList.Sort;
ImageEnMView.LockPaint;
PagesToMove := (iList.Count div 2)-1;
try
for i := 1 to PagesToMove do begin
PageToMove := iList[Pred(iList.Count)] ;
MoveTo := iList[Pred( i*2 )];
ImageEnMView.MoveImage(PageToMove ,MoveTo);
ImageEnMView.UpdateEx(true);
// need this to load file into viewer for update
ImageEnMView.CopyToIEBitmap(PageToMove, ImageEnVectTemp.IEBitmap);
ImageEnMView.CopyToIEBitmap(MoveTo, ImageEnVectTemp.IEBitmap);
end;
ImageEnMView.MIO.SaveToFileTIFF(_Currentfile);
finally
ImageEnMView.UnLockPaint;
ImageEnVectTemp.Free;
end;
end;
end;

xequte

38613 Posts

Posted - Aug 14 2012 :  00:28:59  Show Profile  Reply
Hi Ron

Please email me the TIFF file.



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

rswyman@docuxplorer.com

USA
156 Posts

Posted - Aug 14 2012 :  04:31:41  Show Profile  Reply
its seems that a tif file can not be uploaded so I posted them to our site.

www.docuxplorer.com/download/testdocuments.zip

As part of the test we would select the last 6 pages of the document to be collated.

Thanks
Ron

P.S. Let me know when you have the file so we can remove it from oursite.
Go to Top of Page

rswyman@docuxplorer.com

USA
156 Posts

Posted - Aug 14 2012 :  04:37:41  Show Profile  Reply
One addtional note. The problem seems to be raised when there are more than 38 pages and you try to collate all or just a subset of pages.

Thanks
Ron
Go to Top of Page

rswyman@docuxplorer.com

USA
156 Posts

Posted - Aug 14 2012 :  05:02:19  Show Profile  Reply
After further test we see that this issues is raised when performing any operation when the document is more than 38 pages.
Go to Top of Page

xequte

38613 Posts

Posted - Aug 15 2012 :  20:37:47  Show Profile  Reply
Thanks, Ron, we'll investigate.

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

xequte

38613 Posts

Posted - Aug 16 2012 :  00:54:01  Show Profile  Reply
Hi Ron

Can you give me a simple way to reproduce this without using generics?

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

fab

1310 Posts

Posted - Aug 17 2012 :  00:54:00  Show Profile  Reply
Hi Ron,
because LoadFromFileOnDemand uses threads to load images (when they are actually displayed) please make sure that your code access to an image when it is actually loaded.
Also, please describe what your code should do, another solution (using other ImageEn functions) could be more efficient.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: