Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Show HN: FaceCrop – Align and crop portrait photos with face detection. Parent comment
Center the crop on the detected face and use the detected width or height, whichever is smaller.
If no face, just use 50% of the smallest overall dimension (height or width) and adjust the other dimension to match the ratio.
If an available dimension is exceeded, use what is available and adjust the remaining one to match the ratio.
This should always result in a valid crop ratio.
Always allow for user adjustment.
There are no comments on this comment yet.
Center the crop on the detected face and use the detected width or height, whichever is smaller.
If no face, just use 50% of the smallest overall dimension (height or width) and adjust the other dimension to match the ratio.
If an available dimension is exceeded, use what is available and adjust the remaining one to match the ratio.
This should always result in a valid crop ratio.
Always allow for user adjustment.