/// <summary> /// 用于图像处理后并显示图像 /// </summary> /// <param name="objCfg">图像处理参数配置对象</param> /// <param name="objIBaseData">图像数据对象</param> public void ShowImageProcess(IImageProcessConfig objCfg, IBaseData objIBaseData) { //检查图像是否改变并更新Buffer __UpdateBufferSize(objIBaseData); if (null != objIBaseData) { if (GX_FRAME_STATUS_LIST.GX_FRAME_STATUS_SUCCESS == objIBaseData.GetStatus()) { if (m_bIsColor) { IntPtr pBufferColor = objIBaseData.ImageProcess(objCfg); Marshal.Copy(pBufferColor, m_byColorBuffer, 0, __GetStride(m_nWidth, m_bIsColor) * m_nHeigh); __ShowImage(m_byColorBuffer); } else { IntPtr pBufferMono = objIBaseData.ImageProcess(objCfg); Marshal.Copy(pBufferMono, m_byMonoBuffer, 0, __GetStride(m_nWidth, m_bIsColor) * m_nHeigh); __ShowImage(m_byMonoBuffer); } } } }