Tool to help lazy cartoonists to convert photo of a hand drawing into an SVG/PDF vector file.
$ docker build --tag cartoonist .
$ docker run --rm -v "/absolute/path/to/source/images:/input" cartoonistThis command runs conversion for each JPG file in /absolute/path/to/source/images directory and produces output back to the same directory.
$ ./install.sh- Installs system dependencies.
- Installs necessary Fred's ImageMagick Scripts into the
./libdirectory.
Note: Feel free to contribute installation of dependencies with your favorite package manager if the
install.shscript doesn't work for you.
$ ./cartoonist.sh photo-of-my-drawing.jpgphoto-of-my-drawing.png- PNG, black/transparentphoto-of-my-drawing-i.png- PNG, white/transparentphoto-of-my-drawing.pdf- PDF, black/transparentphoto-of-my-drawing-i.pdf- PDF, white/transparentphoto-of-my-drawing.svg- SVG, black/transparentphoto-of-my-drawing-i.svg- SVG, white/transparent
- 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.
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.
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.