如何从Datagridview读取图像 [英] How Can I Read An Image From A Datagridview
本文介绍了如何从Datagridview读取图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何从datagridview中读取图像
你能帮我吗?
How can i read an image from a datagridview
Can you help me??
推荐答案
请参阅:
https://msdn.microsoft.com/en-us/library/system.windows.forms.datagridviewcell%28v=vs.110%29.aspx [ ^ ],
https://msdn.microsoft.com/en-us/library/system.windows.forms.datagridviewcell.value%28v=vs.110%29.aspx [ ^ ],
https://msdn.microsoft.com/en-us/library/system.windows.forms.datagridviewimagecell%28v=vs.110%29.aspx [ ^ ]。
一些解释:您可以假设某些单元格的运行时类型为System.Windows.Forms .DataGridViewImageCell
;如果你问这个问题,它应该暗示你要注意使用相应的列类型或这个单元格类型用于单独的单元格;并且单元格包含有效的图像数据。您可以检查单元格的ValueType
,看看它是什么类型的数据: https://msdn.microsoft.com/en-us/library/system.windows.forms.datagridviewcell.valuetype(v = VS。 110).aspx [ ^ ]。
-SA
Please see:
https://msdn.microsoft.com/en-us/library/system.windows.forms.datagridviewcell%28v=vs.110%29.aspx[^],
https://msdn.microsoft.com/en-us/library/system.windows.forms.datagridviewcell.value%28v=vs.110%29.aspx[^],
https://msdn.microsoft.com/en-us/library/system.windows.forms.datagridviewimagecell%28v=vs.110%29.aspx[^].
Some explanations: you can assume that the runtime type of some cell isSystem.Windows.Forms.DataGridViewImageCell
; if you are asking this question, it should imply that you take care about using corresponding column type or this cell type for a separate cell; and the cell contains valid image data. You can checkValueType
for the cell and see what kind of data it is: https://msdn.microsoft.com/en-us/library/system.windows.forms.datagridviewcell.valuetype(v=vs.110).aspx[^].
—SA
>
这篇关于如何从Datagridview读取图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文