ios - Render failed because a pixel format YCC420f is not supported -


i'm trying convert cvpixelbufferref uiimage using following snippet:

uiimage *image = nil;  cmsamplebufferref samplebuffer = (cmsamplebufferref)cmbufferqueuedequeueandretain(_queue); if (samplebuffer) {     cvpixelbufferref pixelbuffer = cmsamplebuffergetimagebuffer(samplebuffer);     nsuinteger width = cvpixelbuffergetwidth(pixelbuffer);     nsuinteger height = cvpixelbuffergetheight(pixelbuffer);      ciimage *coreimage = [[ciimage alloc] initwithcvpixelbuffer:pixelbuffer options:nil];     cgimageref imageref = [_context createcgimage:coreimage fromrect:cgrectmake(0, 0, width, height)];      image = [uiimage imagewithcgimage:imageref];      cfrelease(samplebuffer);     cfrelease(imageref); } 

my problem works fine when run code on device fails render when run on simulator, console outputs following:

render failed because pixel format ycc420f not supported

any ideas?


Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -