From: Jesper L. <jl...@dm...> - 2005-08-24 10:59:06
|
Hi matplotlib users, I'm using matplotlib for an application for producing tsunami travel time contour maps. Recently I discovered the CherryPy (cherrypy.org) web server framework which allows you to very easily embed a web server in your application. This allows the application to be accessed remotely through a web browser. At present the application produces the contour plots when it receives input from a web browser that it should do so. The contour plot png image is then saved to disk and served to the user. CherryPy is able to serve/stream the image directly to the browser if it is converted to a string using an appropriate encoding (png, rgb maybe). PIL is able to do this conversion: http://www.theorganization.net/mt/archives/2005/05/30/ive_finally_got_it.html I would like to do something similar with my matplotlib image (i.e. convert it to a string with an appropriate encoding) instead of writing it to the harddisk. Does anyone know if that is possible? Kind regards, Jesper |