How to convert avif to jpg on Ubuntu
avif2jpeg
is a command-line tool to convert images from the AVIF format (a modern, efficient image format) to JPEG. This tool is part of the libavif suite.
1. Installation of libavif (includes avif2jpeg)
On Ubuntu (including 22.04), you can install libavif-tools
:
bashCopy codesudo apt install libavif-tools
This package includes avif2jpeg
.
2. Basic Usage
To convert an AVIF image to JPEG:
bashCopy codeavif2jpeg input.avif output.jpg
3. Quality Settings
By default, avif2jpeg
uses a high-quality setting. If you want to specify the JPEG quality (1-100, where 100 is the highest quality):
bashCopy codeavif2jpeg -q 90 input.avif output.jpg
4. Batch Conversion
To convert multiple AVIF images in a folder:
bashCopy codefor file in *.avif; do avif2jpeg "$file" "${file%.avif}.jpg"; done
5. Display Help
To see all options available for avif2jpeg
:
bashCopy codeavif2jpeg --help
This command will list additional flags and options.
6. Example
Convert an AVIF image named image.avif
to JPEG with default settings:
bashCopy codeavif2jpeg image.avif image.jpg
And with a quality setting of 80:
bashCopy codeavif2jpeg -q 80 image.avif image.jpg
This should help you easily convert AVIF images to JPEG using avif2jpeg
.