transpic-cli 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Cargo.toml +1 -1
- package/README.md +49 -0
- package/package.json +1 -1
- package/Cargo.lock +0 -1342
- package/examples/output/blur.png +0 -0
- package/examples/output/format.jpg +0 -0
- package/examples/output/grayscale.png +0 -0
- package/examples/output/invert.png +0 -0
- package/examples/output/resize.png +0 -0
- package/examples/output/rotate.png +0 -0
- package/examples/test.png +0 -0
package/Cargo.toml
CHANGED
package/README.md
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# transpic-cli
|
|
2
|
+
|
|
3
|
+
A fast image manipulation CLI tool.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g transpic-cli
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
transpic --path <image> [options]
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
At least one action flag is required.
|
|
18
|
+
|
|
19
|
+
## Options
|
|
20
|
+
|
|
21
|
+
| Flag | Type | Description |
|
|
22
|
+
|------|------|-------------|
|
|
23
|
+
| `--path`, `-p` | `string` | Path to the input image *(required)* |
|
|
24
|
+
| `--format` | `string` | Convert output format (`png`, `jpg`, `webp`, …) |
|
|
25
|
+
| `--blur` | `float` | Apply blur with given intensity |
|
|
26
|
+
| `--grayscale` | `boolean` | Convert image to grayscale |
|
|
27
|
+
| `--invert` | `boolean` | Invert image colors |
|
|
28
|
+
| `--resize` | `WxH` | Resize image (e.g. `800x600`) |
|
|
29
|
+
| `--rotate` | `90\|180\|270` | Rotate image by given degrees |
|
|
30
|
+
|
|
31
|
+
## Examples
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
# Convert to WebP
|
|
35
|
+
transpic --path image.png --format webp
|
|
36
|
+
|
|
37
|
+
# Resize and convert
|
|
38
|
+
transpic --path photo.jpg --resize 1280x720 --format webp
|
|
39
|
+
|
|
40
|
+
# Grayscale + blur
|
|
41
|
+
transpic --path image.png --grayscale --blur 2
|
|
42
|
+
|
|
43
|
+
# Rotate and invert
|
|
44
|
+
transpic --path image.jpg --rotate 90 --invert
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## License
|
|
48
|
+
|
|
49
|
+
[MIT](https://github.com/axtraz/transpic/blob/main/LICENSE)
|