GitXplorerGitXplorer
q

face-crop

public
6 stars
0 forks
1 issues

Commits

List of commits on branch master.
Verified
c4aeb78501a839e9030b890b9a7298d8a32b584e

Merge pull request #2 from qwelias/dependabot/npm_and_yarn/debug-4.1.1

qqwelias committed 4 years ago
Verified
07dc0be38b09e55047ef6aea9601a710c7b515cd

Bump debug from 2.2.0 to 4.1.1

ddependabot[bot] committed 4 years ago
Unverified
af4e17564bc5a4cd6e26b455a814e7e3655d86a2

Update README.MD

qqwelias committed 8 years ago
Unverified
6656b9d68bcbb42796e7520530d4c96952efa754

add defaults

qqwelias committed 9 years ago
Unverified
05c2fda767e2102de842d7d29c37e47251432ce7

add defaults

qqwelias committed 9 years ago
Unverified
960f3c58e3538fdb66d61337fb64516c18d4af97

ver upd

qqwelias committed 9 years ago

README

The README file for this repository.

face-crop

Description

Detects face in an image and crops it.

Installation

npm i face-crop

Options

  • src : String - source image absolute path
  • dst : Object
    • path : String - destination image absolute path
    • width? : Number - destination image width ( equals height if not present )
    • height? : Number - destination image height ( equals width if not present )
  • scale? : Number - size multiplier of the found face ( default: 1 )
  • force? : Boolean - crop and resize whole image even if no faces found ( default: false )

Exceptions

Promise will be rejected in case of lack of required options or if no faces found.

Usage

const FC = require('face-crop');
const Path = require('path');

FC({
    src: Path.resolve("./imgs/1.png"),
    dst: {
        path: Path.resolve("./out/1.png"),
        width: 200,
        height: 200
    },
    scale: 3
}).then(path => {
    //foo
}).catch(e => {
    //bar
});