Following my comment: Cirkuit converts TikZ diagrams to images, running something like the following sequence of commands:
pdflatex img.tex pdftops -eps img.pdf convert -density 300 img.eps img.png
Here img.tex will be the LaTeX file following this template:
\documentclass{article} \usepackage{tikz,amsmath,siunitx} \usetikzlibrary{arrows,snakes,backgrounds,patterns,matrix,shapes,fit,calc,shadows,plotmarks} \usepackage[graphics,tightpage,active]{preview} \PreviewEnvironment{tikzpicture} \PreviewEnvironment{equation} \PreviewEnvironment{equation*} \newlength{\imagewidth} \newlength{\imagescale} \pagestyle{empty} \thispagestyle{empty} \begin{document} \begin{tikzpicture} % (your TikZ code goes here) \end{tikzpicture} \end{document}
If you can use Cirkuit or a similar editor or write a script for yourself to put your diagram in this template and run the corresponding tools, you will have a quick way to convert the TikZ code to a PNG image.
To answer your question in more detail ... no, I don’t know how to convert a TikZ diagram directly to PNG without going through a PDF file (or at least a DVI) at some point.
David Z Apr 23 '10 at 21:19 2010-04-23 21:19
source share