Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

ribab/quadart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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