Convert UIImage to CVImageBufferRef

后端 未结 6 724
旧时难觅i
旧时难觅i 2020-12-28 18:09

This code mostly works, but the resulting data seems to loose a color channel (is what I am thinking) as the resulting image data when displayed is tinted blue!

Here

6条回答
  •  忘掉有多难
    2020-12-28 19:03

    Just to clarify the answer above: I've ran into the same issue because my shader code was expecting two layered samples within a image buffer, while I used a single layer buffer

    This line took the rgb values from one sample and passed them to (I don't know what), but the end result is full colored image.

     gl_FragColor = vec4(texture2D(SamplerY, texCoordVarying).rgb, 1);
    

提交回复
热议问题