Skip to content

Commit

Permalink
Merge branch 'main' of github.com:raymondytian/splix into main
Browse files Browse the repository at this point in the history
  • Loading branch information
rymdtian committed Apr 9, 2024
2 parents 18acf43 + 62d3eea commit d3241d1
Showing 1 changed file with 26 additions and 13 deletions.
39 changes: 26 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,36 @@

Splix is a command-line tool written in Rust for splitting images into multiple images based on specified rows, columns, or a custom grid. It offers a simple and efficient way to break down images into smaller components, facilitating various image processing tasks.

Disclaimer: first time writing Rust so code might be terrible
## Disclaimer
first time writing Rust so code might be terrible

Future:
- variable row heights and col widths
## Options
```plaintext
Usage: splix [OPTIONS] --images <IMAGES>
Options:
-i, --images <IMAGES> Path of the image(s) to convert.
Specify the path of an image, or a directory of images. [aliases: image]
-r, --rows <ROWS> The number of rows to split the image into.
Specify an integer, or a list of integers:
-r 4 Split the image into 4 equal rows.
-r 2,3,1,5 Split the image into four rows of different heights.
The image will be divided vertically into 2+3+1+5=11 equal sections.
The first row will take up 2 sections, second row 3 sections, etc.
-c, --cols <COLS> The number of columns to split the image into.
Speicty an integer, or a list of integers.
-c 4 Split the image into 4 equal columns.
-c 2,3,1,5 Split the image into four columns of different widths.
The image will be divided horizontally into 2+3+1+5=11 equal sections.
The first column will take up 2 sections, second column 3 sections, etc.
-o, --output-dir <OUTPUT_DIR> Directory to save the splixed images in. Default: `./splixed-images`
-R, --recursive Enable recursive search for images in specified directory
-h, --help Print help
```
## Future
- grid of any combination of row heights/widths

Future argument details:
splix
-r --row
n [int] - n rows
n_1,n_2,...,n_m {int} - m rows, with height of row being single value with respect to entire height of img

-w --width
-r --row
n [int] - n cols
n_1,n_2,...,n_m {int} - m cols, with width of col being single value with respect to entire width of img

-g --grid
i_1:j_1,...,j_n/i_2,k_1,...,k_n/...
custom grid, any number of rows of any size and any number of cols of any size
Expand Down

0 comments on commit d3241d1

Please sign in to comment.