Menu

#11 image export from script

open
nobody
None
5
2012-12-31
2011-11-19
bigtiti
No

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

Discussion

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.