transform image into string