Foto is a simple image viewer. It simply shows an image either on a window or in the terminal. It…