Adds the ability to write a picture to an IO or StringIO object.