Socket
Socket
Sign inDemoInstall

face-crop

Package Overview
Dependencies
67
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    face-crop

Detects face in image and crops it


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

face-crop

Description

Detects face in 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
  • force? : Boolean - crop and resize whole image even if no faces found

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
});

Keywords

FAQs

Last updated on 19 Apr 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc