Crates.io | img2yaya |
lib.rs | img2yaya |
version | 0.1.1 |
source | src |
created_at | 2021-05-28 21:18:56.781739 |
updated_at | 2021-05-28 21:22:51.191767 |
description | Generate yayagram files from images |
homepage | |
repository | https://github.com/AaronErhardt/img2yaya |
max_upload_size | |
id | 403314 |
size | 110,605 |
Yayagram is a super neat nonogram puzzle game for the terminal. It either generates random grids or loads predefined grids from a file. It even features an editor to easily create your own grids. But let's be honest, creating grids isn't as much fun as playing them.
This is where img2yaya becomes handy. It automatically generates grids from images with the desired dimensions in just a couple of seconds.
cargo install img2yaya
img2yaya --help
img2yaya input.png
img2yaya input.png output.yaya
img2yaya input.png output.yaya -t 50 -i -w 20
Examples of grids generated by img2yaya can be found in the examples folder. Images of those examples loaded and solved in yayagram can be found in the images folder.
If you have a nice grid you'd like to share please open up a pull request to merge this grid into this repository!
img2yaya uses a grayscale format to determine which fields to fill and which not and is therefore not aware of colors. For now the grids are primarily made for playing as a puzzle so other fill types such as "maybe" are not used to represent the color of the image more accurately.
Too much detail in images will likely cause problems due to the limited amount of pixels available on a grid and large grids (over about 20x20) become very hard to play. Therefore simple images with few colors will have the best results.
Varying the threshold can yield much better results.