Giter Club home page Giter Club logo

cartoonist's Introduction

cartoonist

Tool to help lazy cartoonists to convert photo of a hand drawing into an SVG/PDF vector file.

cartoonist

Docker usage

$ docker build --tag cartoonist .
$ docker run --rm -v "/absolute/path/to/source/images:/input" cartoonist

This command runs conversion for each JPG file in /absolute/path/to/source/images directory and produces output back to the same directory.

Installation

$ ./install.sh

Note: Feel free to contribute installation of dependencies with your favorite package manager if the install.sh script doesn't work for you.

Usage

$ ./cartoonist.sh photo-of-my-drawing.jpg

Produces

  • photo-of-my-drawing.png - PNG, black/transparent
  • photo-of-my-drawing-i.png - PNG, white/transparent
  • photo-of-my-drawing.pdf - PDF, black/transparent
  • photo-of-my-drawing-i.pdf - PDF, white/transparent
  • photo-of-my-drawing.svg - SVG, black/transparent
  • photo-of-my-drawing-i.svg - SVG, white/transparent

Why?

  • Black versions are useful for embedding the image on light backgrounds.
  • White versions are useful for embedding the image on dark backgrounds.
  • PDF versions can be imported to Keynote as vector graphics.
  • SVG versions are useful anywhere else as vector graphics.
  • PNG versions are useful as ugly pixelated bitmaps when neither PDF and SVG versions can be used.

Tests

I assembled a little test suite (or rather verification-by-eye suite) to develop this script. Sample images are in the test directory. You can run the suite by executing ./test.sh. It uses throwaway ./build directory where it produces the results.

License

The script is licensed under MIT. If you want to use it, please note that dependencies (especially Fred's ImageMagick Scripts) can have different licensing and you should respect it.

You can freely use the images inside of the ./test directory to develop changes in the cartoonist, but you are not permitted to use them anywhere else unless permitted by me personally. ./test is NOT licensed by MIT and is, for any other use than for debugging this script, a subject of my copyright.

cartoonist's People

Contributors

honzajavorek avatar katoga avatar luminaar avatar oskopek avatar mvidner avatar hroncok avatar tomasbedrich avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.