ubuntu dot to png

C++
dot filename.dot -Tpng -o image.png
Source

Also in C++: