-1

I am trying to generate a video from the screenshots taken from a specific UIVIew. This view have an AVPlayer subview and also a canvas subview(in which we can draw shapes). Just tried the normal way of UIGraphicsGetImageFromCurrentImageContext and the screenshot was black. I think its because the video is rendered in GPU.

So I tried to take a screenshot of a GLKView to which the above two subviews were added. But still its giving the GLKView background colour as images. Referred the below two links for my purpose.

Tried adding glkview as in this post. Taking screenshot from a GLKView

Am I going the right way? If yes, Please help me to understand what I am missing. OR Is there anyother better way to do this? AVAssetImageGenerater is not at all suitable for my requirement and so I cant use it too.

wolverine
  • 189
  • 5
  • 20

1 Answers1

0

AVAssetImageGenerater is not at all suitable for my requirement and so I cant use it too.

What is the reason for this i don't know but by using AVAssetImageGenerater it is possible to take snap of the video and draw the snap image over the screenshot image is easy as you know the frame of the black part.

See below post to put a UIImage over another UIImage.

Draw another image on a UIImage

ugur
  • 3,604
  • 3
  • 26
  • 57