Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TImage and TJpegImage Question

Status
Not open for further replies.

jnecciai

Programmer
Mar 18, 2002
17
US
Hi all ...

I have Jpeg data in a memory buffer (it was not read from a file). I am currently using the following code to show the Jpeg image in a TImage control.

ms->Clear();
ms->Write(JpgBuf, this->ulFrmDataLen);
ms->Seek(0, soFromBeginning);
jp->LoadFromStream(ms);
Image1->Picture->Assign(jp);

where, ms is a TMemoryStream, and jp is a TJpegImage. I would like to reduce the number of steps that it takes to show the image. Is there an alternative?

Thanks, in advance
Jeff
[infinity]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top