Skip to content

Commit

Permalink
Updated readme and windows builds
Browse files Browse the repository at this point in the history
  • Loading branch information
SalOne22 committed Oct 15, 2023
1 parent b664638 commit cbbc927
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 21 deletions.
13 changes: 1 addition & 12 deletions .github/workflows/rimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,6 @@ jobs:
if: matrix.target == 'x86_64-apple-darwin'
run: brew install jpeg-xl

- name: Install libjxl 🧑‍💻 (msvc)
if: matrix.target == 'x86_64-pc-windows-msvc'
uses: johnwason/vcpkg-action@v5
id: vcpkg
with:
pkgs: libjxl
triplet: x64-windows-release
revision: master
token: ${{ github.token }}

- name: Setup rust toolchain 🦀
uses: actions-rs/toolchain@v1
with:
Expand All @@ -112,8 +102,7 @@ jobs:
shell: cmd
run: |
call "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat"
set DEP_JXL_LIB=${{github.workspace}}\vcpkg\installed\x64-windows-release\lib
cargo build --all-features --release
cargo build --features avif,webp --release
- name: Test 🧪
if: matrix.target == 'x86_64-unknown-linux-gnu' || matrix.target == 'x86_64-apple-darwin'
Expand Down
23 changes: 14 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,13 @@ Rimage simplifies and enhances your image optimization workflows. Optimize image

## Installation

Dependencies:
On x86_64 macos requires libjxl installed.

You can download latest release from the [releases](https://github.com/SalOne22/rimage/releases) tab.

> Note: On x86_64-pc-windows-msvc build jxl feature disabled, because of libjxl inability for build on msvc target.
Alternatively you can build rimage from source if you have `rust`, `cargo`, `nasm` and `cmake` installed:

```sh
Expand Down Expand Up @@ -91,29 +96,29 @@ List of available resize filters:

### png => jpg & quality => 90 & backup

|Image Path|Quality|Out Format|Out Dir|Backup|
|----|----|----|----|----|
|"D:\\Desktop\\input [text].png"|90|jpg|"D:\\Desktop\\OutputTest"|True|
| Image Path | Quality | Out Format | Out Dir | Backup |
| ------------------------------- | ------- | ---------- | ------------------------- | ------ |
| "D:\\Desktop\\input [text].png" | 90 | jpg | "D:\\Desktop\\OutputTest" | True |

```sh
rimage.exe "D:\\Desktop\\input [text].png" -q 90 -f jpg -o "D:\\Desktop\\OutputTest" -b
```

### suffix & recursive & quantization & dithering

|Image Path|Quality|Out Format|Suffix|Recursive|Quantization|Dithering|
|----|----|----|----|----|----|----|
|"C:\\ \\ソフトウェア.PNG"|40|png|_문자|True|95|85|
| Image Path | Quality | Out Format | Suffix | Recursive | Quantization | Dithering |
| ----------------------------- | ------- | ---------- | ------ | --------- | ------------ | --------- |
| "C:\\中 文\\ソフトウェア.PNG" | 40 | png | \_문자 | True | 95 | 85 |

```sh
rimage.exe "C:\\中 文\\ソフトウェア.PNG" -q 40 --codec png -s "_문자" -r --quantization 95 --dithering 85
```

### jpg => webp & threads &resize width and height (both are opinional)

|Image Path|Quality|Out Format|Out Dir|Threads|Width|Height|
|----|----|----|----|----|----|----|
|"C:\\Docs\\justfortest.JPG"|40|webp|"C:\\Desktop\\Test"|4|60|10|
| Image Path | Quality | Out Format | Out Dir | Threads | Width | Height |
| --------------------------- | ------- | ---------- | ------------------- | ------- | ----- | ------ |
| "C:\\Docs\\justfortest.JPG" | 40 | webp | "C:\\Desktop\\Test" | 4 | 60 | 10 |

```sh
rimage.exe "C:\\Docs\\justfortest.PNG" --quality 40 --codec webp --output "C:\\Desktop\\Test" --threads 4 --width 60 --height 10
Expand Down

0 comments on commit cbbc927

Please sign in to comment.