博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
c# bitmap和new bitmap(bitmap)及在System.Drawing.Image.get_RawFormat()报错“参数无效”
阅读量:7034 次
发布时间:2019-06-28

本文共 678 字,大约阅读时间需要 2 分钟。

问题情境:

  给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);

 注释:get_RawFormat()报错,意味着在格式转换的地方卡住了。把所有赋pictureBox的image属性重新更一遍。

转载于:https://www.cnblogs.com/gaara-zhang/p/10249660.html

你可能感兴趣的文章
PHP str_replace() 和str_ireplace()函数
查看>>
什么是全栈工程师
查看>>
Html5新特性
查看>>
linux下简易端口扫描器
查看>>
HDU 1205
查看>>
Openstack-L 路由注入方式
查看>>
利用ROS工具从bag文件中提取图片
查看>>
Java常用类库
查看>>
Android开发之Activity转场动画
查看>>
List集合三种遍历方法
查看>>
【译】OpenDaylight控制器:YANG Schema和Model
查看>>
C#访问修饰符(public,private,protected,internal,sealed,abstract)
查看>>
android消息线程和消息队列
查看>>
EXCEL中计算不重复单元格的个数
查看>>
二层设备与三层设备的区别--总结
查看>>
安装pytorch成功但cuda不可用
查看>>
unity__DrawCall的理解
查看>>
springboot架构下运用shiro后在configuration,通过@Value获取不到值,总是为null
查看>>
SQLServer 数据库镜像+复制切换方案
查看>>
Postman初探
查看>>