1.0.8 • Published 6 years ago

cartoon-gimp v1.0.8

Weekly downloads
6
License
ISC
Repository
-
Last release
6 years ago

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