[ Show ]
[ Shrink ]
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.)
Donate to VoyForums (PayPal):
[ Next Thread |
Previous Thread |
Next Message |
Previous Message ]
Date Posted: 07:42:31 11/27/00 Mon
Subject: Re: Get DIB Failed
In reply to:
's message, "Re: Get DIB Failed" on 11:40:23 11/14/00 Tue
I apologize for the delay. I had not noticed the change in the thread. The test program was simply a loop accumulating images in a list and destroying all the images when done:
procedure TForm1.Button1Click(Sender: TObject);
List : TUnOrderedList;
Graphic : TJpegGraphic;
Count : Integer;
List := TUnOrderedList.Create( TObject, CompareLess );
Count := 0;
Stop := False;
while True do
Graphic := TJpegGraphic.Create;
//Graphic.LoadFromFile( 'c:\temp\PA2500461.JPG' );
Graphic.LoadFromFile( 'c:\temp\thumb.jpg' );
Button1.Caption := IntToStr(Count);
if Stop then
Button1.Caption := Button1.Caption + ' done';
An alternative to create a thumbnail viewer is to create a single image, and copy the thumbnails into it. This is how I will attempt it when I get around to it.
Independent of the size of the images, I also think creating a TImageScrollBox for each thumbnail uses a lot of Windows resources. Another idea could be to draw each thumb on a TPaintBox component, which does not have a window handle.
> I thank you for the testing and the response. Could
> you tell me HOW you loaded ONLY a RESIZED image with
> your test project? I think I was doing essentially
> just that with my Thumbnail program, and still cannot
> get past 20 to 30 images loaded sequentially. In
> effect, I was loading each full-size (2048x1536 JPEG)
> image as a TDibGraphic in memory (one only), resizing
> it to 112x112 for display as a thumbnail, and then
> displaying it in a TImageScrollBox. I then DESTROYED
> the original 2048x1536 TDibGraphic BEFORE I loaded the
> next image and repeated the process. So I should NEVER
> be using more resources than what are required to load
> ONE (1) full size image at a time, while maintaining
> the memory for previously loaded 112x112 thumbnails.
> I wonder how other thumbnail programs work, such as
> ACDSee and ImageExpert2000? I understand your argument
> about resource usage under Win9x and maybe Win2000
> (which I plan to try soon), but how do other vendors
> make thumbnails work properly? Perhaps freeing the
> TDibGraphic leaves some sort of residual memory usage
> (a memory leak?) or other anomaly.........
> I reecently tried another test using your sample demo
> program and the image (2048x1536) I sent you. Under
> Win98, if you load the image and then repeatedly
> lighten/darken the image while it is displayed, the
> SAME CreateDIBSection fail occurs. I think the error
> occurs here presumably because you are creating an
> "undo" image.
Next Thread |
Previous Thread |
Next Message |
[ Contact Forum Admin ]
Forum timezone: GMT-5|
VF Version: 3.00b, ConfDB:
VoyForums(tm) is a Free Service from Voyager Info-Systems.
Copyright © 1998-2019 Voyager Info-Systems. All Rights Reserved.