Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

cartoon-gimp

milad.ashjari57ISC1.0.8

Convert your photos to cartoons

picture.to.cartoon, pic.to.cartoon, picture-to-cartoon, photo, cartoon, photo.to.paint, pic-to-paint, gimp, Cartooning

readme

cartoon-gimp

A tool for converting your pictures into cartoons

Installation

First install GIMP

Open terminal via Ctrl+Alt+T and type:

sudo add-apt-repository ppa:otto-kesselgulasch/gimp

sudo apt-get update

sudo apt-get install gimp

Type in the terminal to ensure installation:

sudo gimp-console -version

Output should be:

GNU Image Manipulation Program version 2.x.xx

OK,now type:

npm install cartoon-gimp

Now go to the node_modules folder and open the cartoon-gimp folder. Copy the cartoon.scm file to the following path.Insert GIMP version instead of X for example (/home/milad/.gimp-2.8/scripts).The folder is probably hidden

/home/milad/.gimp-2.x/scripts

Usage

 let {gimp}=require("cartoon-gimp");

 let option={
   filename:"/home/milad/a.jpg",
   prefilter:"TRUE",
   filter:0,//"despeckle":"0","greycstoration":"1","anostropic":"2"
   lineThikness:10,//2-30
   blackShadow:"TRUE",
   shadowIntensity:35,//0-50
   colorLevels:4 //1-5
 }

 let gimpc=new gimp(option);
  gimpc.cartoon().then(done=>{
    console.log(done);
  })
  .catch(err=>{
    console.log(err);
  });

Output should be done