This script converts tif and jpg images into images using the High Efficiency Image File Format in the heic container. This script uses libheif for converting from jpg to heic. It uses imagemagick for conversion from tif to jpg.
The script can convert from tif to heic but it isn't converted straight from tif to heic. It's instead firs converted into a jpg and then converted into heic. This should not affect image quality that much because the conversion from jpg to heic is lossless.
The only dependencies are libheif, libde265 and imagemagick.
Usage: Put the script in the folder that your tif and or jpg files are located in and run it.