Update writeToImg in graphcanvas.py so that writing to image was possible. Previously this was giving a "ValueError: invalid data buffer size" when trying to export to image on a Windows 7 machine.