It would be nice to have image export from scripts like: gtkwave x.vcd --export x.png
I implemented a very complicated workaround, but is there a simple way?
workaround:
http://ponty.github.com/sphinxcontrib-gtkwave/
- start Xvfb headless X server using pyvirtualdisplay
- redirect GTKWave display to Xvfb server by setting $DISPLAY variable.
- start GTKWave with VCD file. Options are set on command-line and in temporary rc file
- temporary tcl script will set time interval and select all signals
- wait until GTKWave is displayed
- take screenshot by pyscreenshot which needs scrot.
- image is processed: toolbar, scrollbar and empty space are removed
ideas:
My first idea is to separate the program, but this may be too much work.
Components:
- rendering library without GUI dependency
- command line for rendering library (gtkwave-render x.vcd x.png)
- python bindings for rendering library
- gtkwave window applet, so other applications can embed gtkwave