Your company here, and a link to your site. Click to find out more.

heif-enc - Man Page

convert image to HEIC/HEIF


heif-enc [-h|--help] [-q QUALITY|--quality QUALITY] [-L|--lossless] [-t SIZE|--thumb SIZE] [--no-alpha] [--no-thumb-alpha] [-o FILENAME|--output FILENAME] [-v|--verbose] [-P|--params] [-b DEPTH] [-p NAME=VALUE] filename[.jpg|.png|.y4m]


heif-enc Convert image to HEIC/HEIF.


-q QUALITY, --quality QUALITY

Defines quality level between 0 and 100 for the generated output file.

-L,  --lossless

Generate lossless output (-q has no effect)

-t SIZE, --thumb SIZE

Generate thumbnail with maximum size SIZE pixels (default: off).


Do not save alpha channel.


Do not save alpha channel in thumbnail image.


Output filename (optional).


Enable logging output (more will increase logging level).

-P,  --params

Show all encoder parameters.


Bit-depth of generated HEIF file when using 16-bit PNG input (default: 10 bit).


Set additional encoder parameters. See Notes below.

Exit Status




Failure (syntax or usage error; error while loading, converting or writing image).


The available input formats depend on the libraries that were available at compile time. Supported are JPEG, PNG and Y4M, the file type is determined based on the extension of the input file.

When specifying multiple source images, they will all be saved into the same HEIF file.

When using the x265 encoder, you may pass it any of its parameters by prefixing the parameter name with x265:. Hence, to set the ctu parameter, you will have to set x265:ctu in libheif (e.g.: -p x265:ctu=64).

Note that there is no checking for valid parameters when using the prefix.


Please reports bugs or issues at https://github.com/strukturag/libheif


Dirk Farin, struktur AG