https://github.com/borodiychuk/patchwork
Patchwork quilt patterns generator
https://github.com/borodiychuk/patchwork
cli go golang patchwork png
Last synced: 11 months ago
JSON representation
Patchwork quilt patterns generator
- Host: GitHub
- URL: https://github.com/borodiychuk/patchwork
- Owner: borodiychuk
- License: mit
- Created: 2017-07-01T16:14:10.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2022-07-14T12:34:40.000Z (over 3 years ago)
- Last Synced: 2025-01-05T23:41:41.463Z (about 1 year ago)
- Topics: cli, go, golang, patchwork, png
- Language: Go
- Homepage:
- Size: 40 KB
- Stars: 1
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Patchwork quilt patterns generator
[](https://travis-ci.org/borodiychuk/patchwork) [](https://goreportcard.com/report/github.com/borodiychuk/patchwork)
This is a tool that generates patchwork quilt pattern out of given square samples.

## How to run it
Get sure you have Go installed, and then run:
```
go get github.com/borodiychuk/patchwork
```
After that you can just call it like that:
```
patchwork -out patchwork.png -sample-file s1.png -sample-file s2.png -sample-color 255,0,127 -sample-color 127,127,255 # ... and so on
```
## How is it built
The application ties together concepts of:
1. *Sample provider*. That is the data source for At this moment the sample can be imported from PNG file.
2. *Pattern composer*. It composes a pattern out of available samples. Right now it can combine random samples in a way that no similar samples stay aside horizontally or vertically.
3. *Result renderer*. It exports the result in particular format. Right now it can export to PNG.
## TODO
* Sample provider that generates sample of given color.
* Composer that generates tetris board filled with respective figures.
* Composer that generates patchwork representation out of provided image.
* Exporter tht exports the result as ASCII text with symbolic schema and pieces count.