2023-07-09 01:15:23 +01:00
|
|
|
# cavif
|
|
|
|
|
2024-02-15 06:37:52 +00:00
|
|
|
> Convert PNG/JPEG images to AVIF. Written in Rust.
|
2024-02-09 13:55:36 +00:00
|
|
|
> See also: `convert`.
|
2023-07-09 01:15:23 +01:00
|
|
|
> More information: <https://github.com/kornelski/cavif-rs>.
|
|
|
|
|
2024-02-09 13:55:36 +00:00
|
|
|
- Convert a JPEG file to AVIF, saving it to `file.avif`:
|
2023-07-09 01:15:23 +01:00
|
|
|
|
2024-02-15 06:37:52 +00:00
|
|
|
`cavif {{path/to/image.jpg}}`
|
2023-07-09 01:15:23 +01:00
|
|
|
|
2024-02-15 06:37:52 +00:00
|
|
|
- Adjust the image quality and convert a PNG file to AVIF:
|
2023-07-09 01:15:23 +01:00
|
|
|
|
2024-02-15 06:37:52 +00:00
|
|
|
`cavif --quality {{1..100}} {{path/to/image.png}}`
|
2023-07-09 01:15:23 +01:00
|
|
|
|
2024-02-09 13:55:36 +00:00
|
|
|
- Specify the output location:
|
2023-07-09 01:15:23 +01:00
|
|
|
|
2024-02-15 06:37:52 +00:00
|
|
|
`cavif {{path/to/image.jpg}} --output {{path/to/output.avif}}`
|
2023-07-09 01:15:23 +01:00
|
|
|
|
|
|
|
- Overwrite the destination file if it already exists:
|
|
|
|
|
2024-02-15 06:37:52 +00:00
|
|
|
`cavif --overwrite {{path/to/image.jpg}}`
|