Skip to content

Commit

Permalink
Revamped input for a nicer experience
Browse files Browse the repository at this point in the history
  • Loading branch information
ahhhh6980 committed Mar 6, 2022
1 parent a83b36a commit 5f79090
Show file tree
Hide file tree
Showing 8 changed files with 405 additions and 189 deletions.
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
target/
palettes/test/
Mosaic.zip
test/
palettes/lobster/
binaries/
prep.sh
README_old.md
168 changes: 161 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
glob = "0.3.0"
clap = { version = "3.1.5", features = ["derive"] }
image = "0.24.0"
ndarray = "0.15.4"
rayon = "1.5.1"
thread = "0.1.0"
thread = "0.1.0"
16 changes: 5 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,11 @@ This can work with any set of images, it doesn't have to be emojis.

## To use:

***It is important to know that this currently only takes in square images for both the input and the palette***
### For prompts:
- `./mosaic`

command line args:
`./mosaic -f Landscape-Color.png -p emoji -fs 256 -ps 16 -v 64.0`
- Specify *file.png* scaled to a max size of 256, using the palette "emoji" scaled to 16x16, with a "variance" of 1/64[^1][^2]

Pass in the extension for the file name!
### For terminal argument input:
- `./mosaic --help`

## How Do You Use Other Images?
1 **Find a collection of images**
Expand All @@ -33,8 +31,4 @@ Pass in the extension for the file name!
2 **Put the images into a named folder**
- In this repo, packaged for convenience, the mentioned collection is named emojis/

3 **Put named folder under palettes/**
- The name of the folder is the palette name

[^1]: image size determines what size the input will be changed to
[^2]: palette size specifies what size the palette images are
3 **Put named folder under palettes/**
Binary file added output/_emoji_f64-p16.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added output/lol_emoji_f64-p16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added output/output_emoji_f64-p16.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 5f79090

Please sign in to comment.