[ 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: 1234567[8]910 ]

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

Date Posted: 08:07:19 03/27/01 Tue
Author: Niek Bakker
Subject: Re: CreateDIB Error
In reply to: Michel 's message, "Re: CreateDIB Error" on 06:55:43 03/27/01 Tue

Hi Chris and Michel,

you could try it this way (it works perfect for me):
1. show the current (selected) image in the imagescrollbox loading it from disk.
2. show the other images (even a large number) with the ListView component:
a. make a thumbnail-image of every photo and store it in a ClientDataSet.
b. get the key-value of the record in the clientdataset (an auto-increment type)
c. add a listview-item to the listview
d. save the key-value obtained at (b.) in the listitem as an object: aListItem.Data := TObject(keyvalue)
e. associate an empty imagelist with the listview setting width and height to an appropriate value (128)
f. write an onItemDraw eventhandler which retreives the correct image from the clientdataset and paint this image on the canvas of the listview...

Hope this helps,
Niek Bakker
>Hi Chris,
>I have manipulated images from my digital camera of
>that size without problems. Try replacing the
>TImageScrollBox by TImage, which will be less
>intensive on resources.
>Best regards,
>>Hi Michael,
>>Unfortunatley its difficult for me to tell customers
>>and users they have to change operating platforms :)
>>The way Ive written one of the modules in our
>>application is that it imports the photos from a
>>digital camera and stores them all on the local disk
>>drive. The preview-window only shows 4 photos at a
>>time (during the import process it generates a low-res
>>preview copy of the primary image). As the user
>>scrolls back and forth thru the previews it flashes
>>the photos on and off disk so there are only every 4
>>low res, and 1 hi-res photo being displayed.
>>Ive run tests importing 100 640x480 photos -
>>importing, processing and then saving to disk. This
>>works okay about 7 times before the CreateDIB error
>>shows up.
>>I then try it using 9 hi-res (2048x1564) images and it
>>failes the 1st time around ...
>>Ive checked the code and everything Im freeing
>>everything as required ... within the form there are
>>5-6 instances of the ImageScrollBox and thats it ...
>>Has anybody else found a solution to this problem ???
>>>Hi Chris,
>>>I wish I had a solution to this. After testing with
>>>MemProof I don't believe there is a resouce leak. So
>>>right now I don't have any ideas on how to improve
>>>this, other than using Windows 2000 which seems to
>>>have better resource handling.
>>>Best regards,

[ 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.