Re: [Matplotlib-users] Storing matplotlib figure's image data straightway to SQL Server

2009-12-19 Thread Panagiotis Kontaxis
database" curs = conn.cursor() code to create image/graph... #canvas contains graph import StringIO data=StringIO.StringIO() canvas.print_figure(data, dpi=150, format="png") sql = "update table set image=%s;" curs.execute(sql,(encoded_data,)) conn.commit()

[Matplotlib-users] Storing matplotlib figure's image data straightway to SQL Server

2009-12-18 Thread Panagiotis Kontaxis
Hello matplotlib users! I 'm using matplotlib for one week and I 'm excited. The only thing I couldn't do is to save image's contect straightway to SQL server. So I 'm searching for a function that store figure's image as binary data in a python variable in order to put the content of this variabl