问题情境:
给picturebox赋image属性,我用一下代码,出错:
Bitmap theBitmap = convertCameraData.display(rawDataArray, height, width, rawImageArray, rgbPalette_256, backgroundTemperature); if (theBitmap == null) { return; } form_Main.pictureBox1.Image = theBitmap;
困境辨析:
把bitmap赋给pictureBox1.Image不正确,应转为image再进行赋值。
Bitmap theBitmap = convertCameraData.display(rawDataArray, height, width, rawImageArray, rgbPalette_256, backgroundTemperature); if (theBitmap == null) { return; } form_Main.pictureBox1.Image = new Bitmap(theBitmap);
原文地址:https://www.cnblogs.com/gaara-zhang/p/10249660.html
时间: 2024-10-28 15:34:38