/// <summary>
/// Get BMP according to the FrameNumber,then display
/// </summary>
/// <param name="FrameNo"></param>
/// <param name="FandR_Flag">direction</param>
/// <returns></returns>
public Bitmap createImage(int FrameNo, int FandR_Flag)
{
string xustr;
byte[] xutest;
xustr = "CAM";
//find image,cost about 1ms .ths original image is 752*480
xutest = ri.Fun_GetSpeData(xustr, FrameNo, FandR_Flag);
//read byte[] into MemoryStream,cost about 1ms
MemoryStream ms = new MemoryStream(xutest, 0, xutest.Length);
//Compress 752*480 as a 200*127 image,here cost 223ms.I wanted this step cost less times,how can I do?
IBitmapImage ibi = ImageUtils.CreateThumbnail(ms, new Size(200, 127));
//cost about 4ms
Bitmap bmp = ImageUtils.IBitmapImageToBitmap(ibi);
xutest = null;
ms.Close();
return bmp;
}
Thanks!