I already tried this CGImage (or UIImage) solution from CALayer
However, I get nothing.
As in the question, I'm trying to get the UIImage from the camera preview level. I know that I can either capture a still image or use the outputbuffer outputs, but my quality video for the session is set to a photo, so either of these two uploads is slow and will give me a large image.
So, as I thought, this could be due to getting the image directly from the preview layer, since it has exactly the size that I need, and the operations are already done on it. I just don't know how to make this layer draw in my context so that I can get it as a UIImage.
Perhaps another solution would be to use OpenGL to get this layer directly as a texture?
Any help would be appreciated, thanks.
source share