Refining functionality for opening images.