UIImage created from CMSampleBufferRef not displayed in UIImageView?

后端 未结 5 1503
难免孤独
难免孤独 2020-12-13 05:21

I\'m trying to display a UIImage in real-time coming from the camera, and it seems that my UIImageView is not displaying the image properly. This is the method which a

5条回答
  •  爱一瞬间的悲伤
    2020-12-13 05:44

    It is also important to set right output format. I had a problem with image capturing when used default format settings. It should be:

    [videoDataOutput setVideoSettings:[NSDictionary dictionaryWithObject:[NSNumber numberWithUnsignedInt:kCVPixelFormatType_32BGRA] forKey:(NSString*)kCVPixelBufferPixelFormatTypeKey]];
    

提交回复
热议问题