Skip to content

0bs3n/painterly

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Painterly

Before and after

Painterly is a program which takes an image as input and will re-draw the image, from scratch, one line at a time. The resulting image is not an exact copy: it has been generated by trial and error to be as close to the original as possible within a given number of iterations. It was designed to test and improve the speed of the image manipulation library being developed alongside it, called siml.

Low res demonstration

Getting Started

painterly depends only on libsiml, and on stb_image/stb_image_write for image loading/writing (thank you Sean Barrett), both of which are bundled, and the C standard library. All you need is a working C compiler and you should be good to go.

Installation

The preferred build method is make:

$ git clone https://github.com/Ethan-ks/painterly.git
$ cd painterly
$ make

However, painterly can also be built using the following commands:

$ gcc -o painterly src/*.c -Iinclude -Ofast -std=c99 -pedantic -Wall -lm 

or from the Windows developer console:

> cl src\painterly.c src\siml.c /Ox /Iinclude /Wall /link /out:painterly.exe

Usage

./painterly -h/--help
./painterly -f/--input-file <input-image> 
            -i/--iterations <iterations / 1000> 
            -s/--sample-method <direct | average> 
            -c/--colors <number-of-colors>

Acknowledgements

Very big thanks to Sean Barrett for writing the fantastic stb libraries and putting them in the public domain.

About

Image duplication/fuzzing in C

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages