//to Mat
	CxImage img;
	img.Load("C:\\f.jpg");
	uint8_t* buf=NULL;
	int32_t len=0;
	bool rs =img.Encode(buf,len,CXIMAGE_FORMAT_BMP);
	cv::Mat temp2;
	vector<uchar> buff2; 
	buff2.resize(len);
	memcpy(&buff2[0],buf,len);
	temp2= cv::imdecode(buff2,1); 
	cv::imshow("111",temp2);
	cv::waitKey();

	//to Cximage
	vector<uchar> buff; 
	cv::imencode(".bmp" ,temp2,buff); 
	CxImage img2(&buff[0],buff.size(),CXIMAGE_FORMAT_BMP);
	img2.Blt(GetDlgItem(IDC_STATIC_P)->GetDC()->GetSafeHdc());

  

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-09-26
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-19
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-29
  • 2022-12-23
  • 2022-12-23
  • 2021-12-01
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案