Board index » cppbuilder » TImage and TStream

TImage and TStream


2004-09-09 11:33:50 PM
cppbuilder73
Hi,
I have JPG image data stored in TStream and also I included <jpeg.hpp>.
In witch way can I load this stream data into TImage?
I found Only
Img->Picture->Bitmap->loadFromStream(...) and this i valid only for bitmap
images
 
 

Re:TImage and TStream

"Giovanni Lazzarini" <glazzariniATmediasoft-srlDOTcom>wrote in message
Quote
I have JPG image data stored in TStream and also
I included <jpeg.hpp>.

In witch way can I load this stream data into TImage?
Instantiate a TJPEGImage instance, load the data into it, and then assign it
to the TImage's Picture property. For example:
#include <Jpeg.hpp>
TJPEGImage *jpg = new TJPEGImage;
try {
jpg->LoadFromStream(YourStream);
Image1->Picture->Assign(jpg);
}
__finally {
delete jpg;
}
Gambit