Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Loading images (Read 3493 times)
x-fgi
YaBB Newbies
*
Offline



Posts: 35
Joined: Aug 14th, 2009
Loading images
Sep 7th, 2009 at 8:57am
Print Post  
Hi Stoyo,
I'm back again with a request.
Is there another way to load images for Icon other than box.LoadPicture or LoadImageFromUrl(URL).
I should Avoid to save/load File from File,
I cannot use the LoadPicFromRes. this because I do not store images in RES (I have had problem with true color images) .
So I load images from .icl files and, as I work in delphi Delphi, I use my own descendent of timagelist to store only once Images in the program, then, when I need to assign a picture to a button or grid or whatever, I assign to it the picture.
From Imagelist i can get a TPicture Object ( or other specialized TBitmap, Timage, TIcon) but I cannot assign it to Box.Picture.... I can also have available the Stream data.
But How can i assign it to Box.Picture?

Do you have any suggestion?
Franco
  

Franco
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Loading images
Reply #1 - Sep 7th, 2009 at 1:41pm
Print Post  
Hi Franco,

It seems you will have to save the TBitmap to a TMemoryStream, and then create an IPicture from the image data using the TPictureAdapter Delphi class. Check the IPicDispFromStream function from this page:
http://www.experts-exchange.com/Programming/Languages/Pascal/Delphi/Q_21554437.h...

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint