Image duplication/fuzzing in C
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
doc
include
src
.gitignore
Makefile
README.md

README.md

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.