Skip to content

Spyduck/pyautopainter

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

pyautopainter

A Python script to paint a copy of a reference image on a blank canvas using brushstrokes.

example gif at 2x speed

Runs a Flask app on port 8001.

Installation:

pip install -r requirements.txt

Running:

python pyautopainter.py

Then open your browser to http://localhost:8001/

Put new images in the "input" directory and refresh the browser window to load them in.

The color_distance_threshold setting is the distance between the color on the image and the color to paint a brush stroke at that spot. If lower, the brush stroke will be skipped. I recommend experimenting with this but 10-40 can get good results.

color_distance_threshold examples

Put extra brushes in "brushes" -- they will load the next run or iteration. Brushes can be any size, but need some space at the edge of the image to be rotated correctly when running.

Put extra palettes as .png in "palette"

The canvas will be saved to output/out.png when it finishes, or you can save the JPEG version from your browser.

About

A Python script to paint a copy of a reference image on a blank canvas using brushstrokes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published