The heif-enc command line tool is an example application for converting images to HEIF files. It can read JPEG, PNG, TIFF, and Y4M images and it writes all variants of HEIF like HEIC, AVIF, or ...