how to convert image in a byte[] array to Xamarin.IOS UIImage control

十年热恋 提交于 2021-01-29 08:08:02

问题


My Xamarin.IOS app gets build error: "cannot convert type byte[] to UIKit.UIImage"

My code:

ImageView_camera.Image =         Camera_Socket_Client.packet_frame_state.buffer;

The buffer contains a frame sent by socket from a UWP Windows app, which got the frame from a USB camera from a Logitech HD 1080p webcam.

I want to show live image from webcam at IPAD.


回答1:


UIImage.LoadFromData(NSData.FromArray(myByteArray));


来源:https://stackoverflow.com/questions/53890842/how-to-convert-image-in-a-byte-array-to-xamarin-ios-uiimage-control

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!