To enable support for JPEG2000 and HEIF, it is not enough to install jasper and libheif, respectively. You must install x265 too (and perhaps rebuild jasper and libheif).