Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我只能通过在运行时右键单击选择“加载图像”选项来在控件上加载图像。
我想知道是否有一种方法可以通过专门传递 Image 对象来加载它,因为当我尝试像往常一样进行操作时,设置它imagebox.Image = (...) 会产生错误,因为它imagebox.Image是一个“IImage”对象。
imagebox.Image = (...)
imagebox.Image
有小费吗?谢谢 :)
你可以试试这个:
Image<BGR, Byte> rstImg = new Image<BGR, Byte>(imageBox.Image.Bitmap); imageBox.Image = rstImg;