Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

JavaScript API wrapper for the FaceApp tool for Android and iOS

License

Notifications You must be signed in to change notification settings

dshved/faceapp.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

30 Commits

Repository files navigation

FaceApp

JavaScript API wrapper for the FaceApp tool for Android and iOS. Licensed under ISC License.

NOTE: Node.js 8 or higher is REQUIRED

Installation

Using NPM: npm install faceapp
Using Yarn: yarn add faceapp

Usage

First, import the module

const faceapp = require('faceapp')

The function takes two parameters:

  • path: string | file: Buffer - Path to the image file you would like to process. Or a Buffer object representing an image.
  • filterID: string - FaceApp Filter ID

Example

// Import the module
const faceapp = require('faceapp')
// Process the image (filepath)
let image = await faceapp.process('path/to/image.png', 'smile_2')
// Process the image (buffer)
// First we have to get a buffer
let res = await superagent.get('http://example.com/image.png')
let image = await faceapp.process(res.body, 'hot')

Filter IDs

There are some known Filter IDs:

  • no-filter
  • smile
  • smile_2
  • hot
  • old
  • young
  • female_2
  • female
  • male
  • pan
  • hitman
  • hollywood
  • heisenberg
  • impression
  • lion
  • goatee
  • hipster
  • bangs
  • glasses
  • wave
  • makeup

However, you can get an up-to-date list of all available filter IDs from the API directly using the listFilters function.

let filters = await faceapp.listFilters()
// Returns an array of Filter objects
let filters = await faceapp.listFilters(true)
// Returns an array filter ID strings

Thanks

About

JavaScript API wrapper for the FaceApp tool for Android and iOS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%

AltStyle によって変換されたページ (->オリジナル) /