TST: use BytesIO to save images into file-like object

StringIO does not work on Python 3