BradLarson / GPUImage3

GPUImage 3 is a BSD-licensed Swift framework for GPU-accelerated video and image processing using Metal.
BSD 3-Clause "New" or "Revised" License
2.68k stars 331 forks source link

Allow Camera's imageOrientation to be controlled externally #43

Open tastycode opened 5 years ago

tastycode commented 5 years ago

During the upgrade to GPUImage3 from GPUImage2, the ability to modify the orientation of the camera was removed. I need to be able to do this, and have tried by converting the imageOrientation property of Camera from a function to a variable that I set externally. It works 95% of the way. For some reason, the very first time I setup the camera, the orientation is wrong. Any subsequent initialization of the camera, seems to work fine.

@BradLarson Could you either make this change, or if not, would you be willing to pair with me remotely (of course I'd be happy to compensate you for your time), or otherwise help me make this happen? I'm totally stuck and can't do anything without your help.

BradLarson commented 5 years ago

Let me take a look at this, I'm in the process of adding a bunch of filters to the framework anyway. I'll see what I can get working tomorrow.

BradLarson commented 5 years ago

I just committed a new orientation parameter that you can initialize or set on Camera, which might do what you want, even on the first frame. Give that a try and see if that works for your needs.