Goal
Pass images from a C process to a Python process quickly.
Details
The C process is a command line tool which produces raster images. The Python process is a GUI application which asks to C tool to produce images and then shows these images. So, a user (after his action) waits for the images to be shown in the GUI.
Speed requirements
Currently used system is to write files to the disk by C application and then read back by the Python application. The size of images may differ in pixels (but approx. 1000x1000). The current format is uncompressed, however using the compressed format the transfer was slow too.
Usually, more than one image need to be created and shown, so some parallel approach can be applied too. However, parallelization by itself (as well as compression) hasn't made the transfer quicker.
Platforms and license
The solution should be cross-platform, especially GNU/Linux, MS Windows and Mac OS X.
The project is under GNU GPL 2 or higher, so the solution should be compatible.
Libraries
The solution should not bring new large dependencies such as boost library. Smaller, system or already used libraries are more welcome.
The C application is using cairo library. It is preferred not to add new dependencies unless it is really needed. In extreme case, it would be possible to wrap C code into Python script using ctypes but it is not preferred.
The Python application is using wxPython, ctypes and PIL. New dependencies can be added and new libraries can be (even) included (but less dependencies is better).