JSPM

photo2anime

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 6
  • Score
    100M100P100Q32968F
  • License ISC

Transform your selfie into an anime image

Package Exports

  • photo2anime

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (photo2anime) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Photo2Anime!

image

Transform your images applying an anime / manga style using AI.

It is based on the Photo2Cartoon repository

Installation

npm i --save photo2anime

Example

Transform an image from an external url

const photo2anime = require('photo2anime');
const anime = new photo2anime();

anime.on('ready', () => {
    anime.transform({
        photo: 'https://media.gq.com.mx/photos/5e220ec2ffa8c7000803441e/16:9/w_1920,c_limit/40-datos-curiosos-para-descubrir-a-scarlett-johansson.jpg',
        // To save the image to a specific path
        destinyFolder: './images'
    })
    .then(data => {
        console.log('Image', data);
    })
    .catch(err => {
        console.log('Error', err);
    })
})

Transform a local image and get image in base64

const photo2anime = require('photo2anime');
const anime = new photo2anime();
const path = require('path');

anime.on('ready', () => {
    anime.transform({
        photo: path.join(__dirname, './image.jpg')
    })
    .then(data => {
        console.log('Image in base64', data);
    })
    .catch(err => {
        console.log('Error', err);
    })
})

You can find a job where this module is used directly on whatsapp here: WABOT