• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 184
  • Last Modified:

Project with a LOT of images "TImages" on Form. Need better way!

Hello All;

  Our current project has become a BIG problem.

  The project is used for displaying Advertisers information.
The Information is Displayed via TImages of the Form.

  The Form (Only a single Form) Will have nearly 1,000 Images displayed.
Each Image will be linked to it's corrosponding page on the Advertisers web Page.
Sets of Images are held (Displayed) from TPageControl.TabSheets.

   The project right now have over 250+ TImages on it.
Memory Usuage when the .exe is run is hitting: 22,973kb Mem Usuage.

Is there a safer way of developing a Image project like this?
That will not be so HIGH of a Memory Hog?

We have thought about having Text information besides the TImages.
But that will not work for the type of project that it is.
As it is an Advertising program, so it will need to display the images
For the Viewers to see.

While writing this now, thinking that maybe some sort of an HTML page.
And just have the pages installed onto the End-Users computer into the
Program Directory. And Encrypt the HTML Files if they prefer to go this route.

Any idea's or better solution please advice.

Thanks All
Wayne Barron
Wayne Barron
1 Solution
The obvious solution is to not load all images at once.
TVirtualTreeView from Mike Lischke is the solution to that.
1) Convert Images to JPEG
2) Compile them as resource (article: http://delphi.about.com/od/objectpascalide/l/aa021301a.htm)
3) Use TResourceStream to extract the resource from the Exe file
4) Load the image in TJpegImage (uses ...,jpeg; )
5) Assign the Bitmap of the image to the TJpegImage to load the image itself
That is a silly idea. To show the Jpeg it has to be converted to a TBitmap (that is what Picture.Graphic.Bitmap is for).
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Wayne BarronAuthor Commented:

   I have "VirtualTreeview" Installed (The Latest Version)
Could you please give me some assistance in what to do?

This is what I need (this way you will know everything basically)

Product Images (All images are either .jpg (or) .gif / If they all need to be .jpg let me know, I can convert the
                         .gif images over.)

The Images are then linked to a website.
In my case it is simply done through the OnClick


Thanks for any assistance that you can provide.

Sorry, i do not understand much of TVirtualTreeView. There should be examples available.
BTW Mike Lischke has support forums.
Wayne BarronAuthor Commented:
Thanks for the information, I am going to post a new question
In hopes that someone can assist in an example of how to do what I
Am needing to do.

I also posted a question on the "Support Forum" on Mike's site.
So will wait to see what type of replies on get on that one.

Take Care and thanks
most likely you can just read through the forums and find the answer, or look at the amazing demos...

don't expect it to be easy though, but once you get the hang out of it, is quite powerful
Wayne BarronAuthor Commented:
Hello BlackTigerX;

  Is there any more demo's then the ones that come with the component set?


Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now