|
4 | 4 |
|
5 | 5 | ##### Compression (at least one is required)
|
6 | 6 |
|
7 |
| -- -q, --quality <QUALITY> |
| 7 | +- `-q, --quality <QUALITY>` |
8 | 8 | Sets compression quality between 0 and 100. Higher the value, better the quality and bigger the file size.
|
9 |
| -- --lossless |
| 9 | +- `--lossless` |
10 | 10 | Perform lossless compression. Some file formats may not support this or result in bigger file sizes.
|
11 |
| -- --max-size <MAX_SIZE> |
| 11 | +- `--max-size <MAX_SIZE>` |
12 | 12 | Attempts to compress the image to the nearest size in bytes without exceeding it. If the requested size is too small,
|
13 | 13 | it will output the smallest possible result.
|
14 | 14 |
|
15 | 15 | ##### Advanced compression
|
16 | 16 |
|
17 |
| -- --png-opt-level <PNG_OPT_LEVEL> |
| 17 | +- `--png-opt-level <PNG_OPT_LEVEL>` |
18 | 18 | Sets the optimization level for PNG files. Higher values result in better compression but take longer to complete.
|
19 | 19 | Possible values are between 0 and 6. Default is 3.
|
20 |
| -- --zopfli |
| 20 | +- `--zopfli` |
21 | 21 | Use zopfli when optimizing PNG files. It may take a very long time to complete, especially if the application is not
|
22 | 22 | build in release mode.
|
23 | 23 |
|
24 | 24 | ##### Metadata
|
25 | 25 |
|
26 |
| -- -e, --exif |
| 26 | +- `-e, --exif` |
27 | 27 | Keeps EXIF metadata info during compression, if present. This can slightly increase the output file size.
|
28 |
| -- --keep-dates |
| 28 | +- `--keep-dates` |
29 | 29 | Keeps the original last modified and last accessed date information, if possible.
|
30 | 30 |
|
31 | 31 | ##### Resizing
|
32 | 32 |
|
33 |
| -- --width <WIDTH> |
| 33 | +- `--width <WIDTH>` |
34 | 34 | Sets the width of the output image. If height is not set, it will preserve the aspect ratio. Can't be used with
|
35 | 35 | `--long-edge` or `--short-edge`.
|
36 |
| -- --height <HEIGHT> |
| 36 | +- `--height <HEIGHT>` |
37 | 37 | Sets the height of the output image. If width is not set, it will preserve the aspect ratio. Can't be used with
|
38 | 38 | `--long-edge` or `--short-edge`.
|
39 |
| -- --long-edge <LONG_EDGE> |
| 39 | +- `--long-edge <LONG_EDGE>` |
40 | 40 | Sets the size of the longest edge of the image. It is aware of rotation metadata. Can't be used with `--width` or
|
41 | 41 | `--height` or `--short-edge`.
|
42 |
| -- --short-edge <SHORT_EDGE> |
| 42 | +- `--short-edge <SHORT_EDGE>` |
43 | 43 | Sets the size of the shortest edge of the image. It is aware of rotation metadata. Can't be used with `--width` or
|
44 | 44 | `--height` or `--long-edge`.
|
45 | 45 |
|
46 | 46 | ##### Destination
|
47 | 47 |
|
48 |
| -- -o, --output <OUTPUT> |
| 48 | +- `-o, --output <OUTPUT>` |
49 | 49 | Sets the output folder. If the folder does not exist, it will be created. Can't be used with `--same-folder-as-input`.
|
50 |
| -- --same-folder-as-input |
| 50 | +- `--same-folder-as-input` |
51 | 51 | Sets the output folder to be the same as the input folder. WARNING: this can potentially overwrite the original files
|
52 | 52 | if a suffix is not set. Overwritten files CANNOT be recovered.
|
53 |
| -- --suffix <SUFFIX> |
| 53 | +- `--suffix <SUFFIX>` |
54 | 54 | Adds a suffix to the output filename, before the file extension.
|
55 |
| -- -S, --keep-structure |
| 55 | +- `-S, --keep-structure` |
56 | 56 | Preserves the folder tree structure of the input files. Can be used only with `-R`.
|
57 |
| -- -o, --overwrite <OVERWRITE> |
| 57 | +- `-o, --overwrite <OVERWRITE>` |
58 | 58 | Sets the overwrite policy if the output file already exists. Possible values are:
|
59 | 59 | - `all`: Always overwrite
|
60 | 60 | - `never`: Never overwrite
|
61 | 61 | - `bigger`: Overwrite only if the file to be overwritten is bigger
|
62 |
| -- --format <FORMAT> |
| 62 | +- `--format <FORMAT>` |
63 | 63 | Converts the original image to the selected format. Possible values are:
|
64 | 64 | - `jpeg`
|
65 | 65 | - `png`
|
|
69 | 69 |
|
70 | 70 | ##### Other
|
71 | 71 |
|
72 |
| -- -R, --recursive |
| 72 | +- `-R, --recursive` |
73 | 73 | If the input is a folder, scan its subfolders too.
|
74 |
| -- -d, --dry-run |
| 74 | +- `-d, --dry-run` |
75 | 75 | Do not write output files, only simulate the process.
|
76 |
| -- --threads <THREADS> |
| 76 | +- `--threads <THREADS>` |
77 | 77 | Specify the number of parallel jobs. The maximum is the number of processors available. `0` means that the application
|
78 | 78 | will try to guess the maximum number of parallel jobs available. Default is `0`.
|
79 |
| -- -Q, --quiet |
| 79 | +- `-Q, --quiet` |
80 | 80 | Suppress all output. Overrides `--verbose`.
|
81 |
| -- --verbose <VERBOSE> |
| 81 | +- `--verbose <VERBOSE>` |
82 | 82 | Select how much output you want to see. Possible values are:
|
83 | 83 | - `quiet`: Suppress all output
|
84 | 84 | - `progress`: Show only progress and final results
|
85 | 85 | - `warnings-and-errors`: Show also skipped and error messages
|
86 | 86 | - `all`: Print all
|
87 |
| -- -h, --help |
| 87 | +- `-h, --help` |
88 | 88 | Print help. A summary can be seen with `-h`.
|
89 |
| -- -V, --version |
| 89 | +- `-V, --version` |
90 | 90 | Print version.
|
91 | 91 |
|
92 | 92 | ### Full help
|
|
0 commit comments