/// <summary> /// 红外图绘制 /// </summary> /// <param name="graphic"></param> /// <param name="w"></param> /// <param name="h"></param> /// <returns></returns> bool DrawImages(Graphics graphic, int w, int h) { if (!_DataDisplay.GetDevice().IsProcessingImage()) { return(false); } IntPtr pIrData = IntPtr.Zero; IntPtr pIrInfo = IntPtr.Zero;; if (!_DataDisplay.GetDevice().GetOutputBMPdata(ref pIrData, ref pIrInfo)) { return(false); } GroupSDK.CAMERA_INFO info = _DataDisplay.GetDevice().GetCamInfo(); IntPtr hDC = graphic.GetHdc(); WINAPI.SetStretchBltMode(hDC, WINAPI.StretchMode.STRETCH_HALFTONE); WINAPI.StretchDIBits(hDC, 0, 0, w, h, 0, 0, info.intVideoWidth, info.intVideoHeight, pIrData, pIrInfo, (uint)WINAPI.PaletteMode.DIB_RGB_COLORS, (uint)WINAPI.ExecuteOption.SRCCOPY); graphic.ReleaseHdc(); return(true); }