Skip to content

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

License

Notifications You must be signed in to change notification settings

Spyduck/pyautopainter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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