a rewite of python-photoviewer