Files
tldr/pages.zh/common/cavif.md

21 lines
541 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# cavif
> 将 PNG/JPEG 图像转换为 AVIF。使用 Rust 编写。
> 另请参见:`convert`。
> 更多信息:<https://github.com/kornelski/cavif-rs>。
- 将 JPEG 文件转换为 AVIF并保存为 `file.avif`
`cavif {{path/to/image.jpg}}`
- 调整图像质量并将 PNG 文件转换为 AVIF
`cavif --quality {{1..100}} {{path/to/image.png}}`
- 指定输出位置:
`cavif {{path/to/image.jpg}} --output {{path/to/output.avif}}`
- 如果目标文件已存在,则覆盖它:
`cavif --overwrite {{path/to/image.jpg}}`