C++ Builder Image控件问题 10
2个回答
展开全部
1,服务器转过来的流,存成内存流,
2,一般jpeg格式。
3,用Image 加载Load.
参考:
TMemoryStream* StreamPileImg; //把数据流存到这里
StreamPileImg = new TMemoryStream();
try{
TJPEGImage *jpg = NULL;
jpg = new TJPEGImage;
jpg->LoadFromStream(StreamPileImg);
img1->Picture->Assign(jpg);
delete jpg;
}
catch(...)
{
}
delete StreamPileImg ;
2,一般jpeg格式。
3,用Image 加载Load.
参考:
TMemoryStream* StreamPileImg; //把数据流存到这里
StreamPileImg = new TMemoryStream();
try{
TJPEGImage *jpg = NULL;
jpg = new TJPEGImage;
jpg->LoadFromStream(StreamPileImg);
img1->Picture->Assign(jpg);
delete jpg;
}
catch(...)
{
}
delete StreamPileImg ;
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询