[ Show ]
Support VoyForums
[ Shrink ]
VoyForums Announcement: Programming and providing support for this service has been a labor of love since 1997. We are one of the few services online who values our users' privacy, and have never sold your information. We have even fought hard to defend your privacy in legal cases; however, we've done it with almost no financial support -- paying out of pocket to continue providing the service. Due to the issues imposed on us by advertisers, we also stopped hosting most ads on the forums many years ago. We hope you appreciate our efforts.

Show your support by donating any amount. (Note: We are still technically a for-profit company, so your contribution is not tax-deductible.) PayPal Acct: Feedback:

Donate to VoyForums (PayPal):

Login ] [ Contact Forum Admin ] [ Main index ] [ Post a new message ] [ Search | Check update time | Archives: 123[4]5678910 ]

[ Next Thread | Previous Thread | Next Message | Previous Message ]

Date Posted: 10:49:37 02/20/03 Thu
Author: Dave Bracken
Subject: RE-Reguarding speeding up my app - Help!

Hello again.
I tried your suggestion in the previous post, but now it runs super fast on small files, but even slower than before on the large images. My code is something along the lines of:

for aa := 0 to filelistbox1.items.count - 1 do begin
FileStream := TFileStream.create(FileListBox1.filename, fmOpenRead);
GraphicFile := TTiffGraphic.Create;
PageCount := GraphicFile.GetImageCount(FileStream);

for ii := 0 to PageCount - 1 do begin
PageToLoad := ii + 1;
GraphicFile.ImageToLoad := PageToload;

if GraphicFile <> nil then begin //These must be destroyed to release the file for deletion upon completion of conversion
if FileStream <> nil then Begin
Deletefile(Filelistbox1.Filename); //Deletes The original file after converting it.

Ok, so i step through the code to see why it is running slower on my large file, and the slow down seems to be in the "LoadFromStream" line of code. It takes a full 3 to 4 seconds per image in the file to load. It took my software almost 5 minutes to convert 2 files. 1 was a 16 page file, and the other was a 267 page file(9 mb). It did not take as long doing it the other way(looping through a scrollbox).
What am i missing here?
Any further help you can provide would be greatly appreciated.
Thanks again in advance,
Dave Bracken

[ Next Thread | Previous Thread | Next Message | Previous Message ]


[ Contact Forum Admin ]

Forum timezone: GMT-5
VF Version: 3.00b, ConfDB:
Before posting please read our privacy policy.
VoyForums(tm) is a Free Service from Voyager Info-Systems.
Copyright © 1998-2019 Voyager Info-Systems. All Rights Reserved.