CVPixelBufferRef 转UIImage resize

CIImage *ciimage = [CIImage imageWithCVPixelBuffer:pixelBuf];
CIImage *scaledImage = [ciimage imageByApplyingTransform:(CGAffineTransformMakeScale(0.5, 0.5))];
CIContext *context = [CIContext contextWithOptions:nil];
CGImageRef cgimage = [context
                   createCGImage:scaledImage
                   fromRect:scaledImage.extent];
UIImage *uiimage = [UIImage imageWithCGImage:cgimage];

推荐阅读更多精彩内容