convert image to string, which can be displayed in terminal.