This repository was archived by the owner on Feb 11, 2019. It is now read-only.

Description
The method videoPreviewBoxForGravity:frameSize:apertureSize: should return a video box with a negative x/y origin when the videoBox width/height is greater than the frame width/height!
Here's the fix!
(Lines 175-185 in DetectFace.m)
CGRect videoBox;
videoBox.size = size;
if (size.width < frameSize.width)
videoBox.origin.x = (frameSize.width - size.width) / 2;
else
videoBox.origin.x = -(size.width - frameSize.width) / 2;
if ( size.height < frameSize.height )
videoBox.origin.y = (frameSize.height - size.height) / 2;
else
videoBox.origin.y = -(size.height - frameSize.height) / 2;