dist/js/cropjs.js
function(rect) {
            var imageRadius = 0,
                imagePoint = {
                x: rect.x,
                y: rect.y
            };

            if (rect.width / this._image.w > 0.45) {
                // Feature point (face) takes up a large portion of the image
                rect.height *= 1.2;

                imagePoint.x += rect.width / 2;
                imagePoint.y += rect.height / 2;

                if (rect.height > rect.width) {
                    imageRadius = rect.height / 2;
                }
                else {
                    imageRadius = rect.width / 2;
                }
            }
            else {
                // Feature point (face) takes up less of the image
                rect.height *= 1.4;

                imagePoint.x += rect.width / 2;
                imagePoint.y += rect.height / 4;

                if (rect.height > rect.width) {
                    imageRadius = rect.height / 2;
                }
                else {
                    imageRadius = rect.width / 2;
                }
            }

            this._image.addFocusPoint(imagePoint, imageRadius);
        }
function(rect) {
            var imageRadius = 0,
                imagePoint = {
                x: rect.x,
                y: rect.y
            };

            if (rect.width / this._image.w > 0.45) {
                // Feature point (face) takes up a large portion of the image
                rect.height *= 1.2;

                imagePoint.x += rect.width / 2;
                imagePoint.y += rect.height / 2;

                if (rect.height > rect.width) {
                    imageRadius = rect.height / 2;
                }
                else {
                    imageRadius = rect.width / 2;
                }
            }
            else {
                // Feature point (face) takes up less of the image
                rect.height *= 1.4;

                imagePoint.x += rect.width / 2;
                imagePoint.y += rect.height / 4;

                if (rect.height > rect.width) {
                    imageRadius = rect.height / 2;
                }
                else {
                    imageRadius = rect.width / 2;
                }
            }

            this._image.addFocusPoint(imagePoint, imageRadius);
        }
function ( rect ) { var imageRadius = 0 , imagePoint = { x : rect . x , y : rect . y } ; if ( rect . width / this . _image . w > 0.45 ) { // Feature point (face) takes up a large portion of the image rect . height *= 1.2 ; imagePoint . x += rect . width / 2 ; imagePoint . y += rect . height / 2 ; if ( rect . height > rect . width ) { imageRadius = rect . height / 2 ; } else { imageRadius = rect . width / 2 ; } } else { // Feature point (face) takes up less of the image rect . height *= 1.4 ; imagePoint . x += rect . width / 2 ; imagePoint . y += rect . height / 4 ; if ( rect . height > rect . width ) { imageRadius = rect . height / 2 ; } else { imageRadius = rect . width / 2 ; } } this . _image . addFocusPoint ( imagePoint , imageRadius ) ; }
Add a feature point with radius.

Heads are important and therefore we naïvely assume features to be faces. Heads
are larger so we need to increase rect height about 40% and then move the y point
so that the forehead can be covered by the full focus point.

Then again. If the face covers more than a certain percent of the image (closeup)
we do not want to enlarge the feature point radius that much.
@param rect
Add a feature point with radius .