Skip to content

Latest commit

 

History

History
44 lines (33 loc) · 1.26 KB

README.md

File metadata and controls

44 lines (33 loc) · 1.26 KB

QuadArt

Simple module for generating QuadTree art

featured in codingwithricky.com

Input Output

Image attribution: kstudio on freepik.com

Example usage through shell

Setup:

$ virtualenv --python=python3 env
$ source env/bin/activate
$ pip3 install -r requirements.txt

Run:

$ wget https://image.freepik.com/free-photo/green-apple-with-leaves_1101-453.jpg
$ ./quadart.py green-apple-with-leaves_1101-453.jpg --thresh 40

Example usage as a python module

QuadArt isn't currently a pip module, so you first need to clone it first before you can use it.

Bash:

$ git clone https://github.com/ribab/quadart

Python3:

>>> from quadart import quadart
>>> q = quadart.QuadArt()
>>> q.generate('green-apple-with-leaves_1101-453.jpg')
>>> q.display() # to display without saving
>>> q.save('green-apple-quadart.jpg') # save to file