First, install certain utilities: sudo apt-get install libheif-examples Second, navigate to a directory where there…