gniemann/BlurredVideo

Change video orientation

Opened this issue · 1 comments

Hi there, I read your article and I have to tell you that you have saved my day. Everything works ok except one thing: I want to change the video orientation to portrait and I am struggling to find the way. I don't have experience in Metal so I was wondering if you could give me any advice. Thanks in advance.

For anyone else has the same problem, I just found the solution: in displayLinkUpdated(link: CADisplayLink) function, change this line of code
let baseImg = CIImage(cvImageBuffer: pixbuf)
into this
let baseImg = CIImage(cvImageBuffer: pixbuf).oriented(forExifOrientation: 6)