Front camera Mirror view
When i change from back camera to front camera the view is like a mirror effect.
By default, the front-facing camera mirrors the input. I used to do it the other way, but people complained. You can override this behavior by using -setInputRotation:atIndex: on the view for the front-facing camera.
Thanks, i did this.
if (stillCamera.cameraPosition == AVCaptureDevicePositionFront)
{
[filterView setInputRotation:kGPUImageRotate180 atIndex:0];
}
But front camera is no so good like back camera because with back camera i can move my iphone y rotate it and the uiview is like position that i see between the camera but with front camera dont works. I put the iphone in a portrait mode and my image is upside down but when i put the iphone en landscape rigth or left and is perfect
jadelmag, thanks for pointing this out. I too have this issue. I am now calling setInputRotation:kGPUImageNoRotation when I'm in Portrait mode and kGPUImageRotate180 in landscape whenever the device is rotated and this seems to work for me.
I'm using [self.cameraView setInputRotation:kGPUImageFlipHorizonal atIndex:0]; but i've only been testing with portrait so far.
also note you need to reset that (kGPUImageNoRotation) if you change cameras back to the rear.
Steve, good call about FlipHorizontal. This worked better than Rotate180.
There is now an exposed property for this, horizontallyMirrorFrontFacingCamera, because people complained no matter which way I set this. You can trigger mirroring on and off for the front camera using this property.