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