This isn't quite an answer to your question. I don't have or know much about Tex2png. It seems to me that perhaps Tex2png is limited in the extent to what sorts of environments it can handle. Namely, it looks like it doesn't handle math environments very well.
But, you can create something similar just running
pdflatex. Here's an example:
Granted, this will be a
pdf document. Perhaps you can use it as is. But, if you actually need to work with a
png, there are various tools available that will allow you to convert from one kind of format to another.
The provided solution to How to output a multiline equation with no margins may be of interest to you.
The solution to Compile a LaTeX document into a PNG image that's as short as possible also talks about how to convert between file formats.
Using other environments
If you want to use other environments like
align, then you can still do something similar, but you will need to somehow pass
align a page width to work with. That can be achieved by using the
preview option passed to the documentclass:
Since you're likely to get an image much wider than you want with this approach, look at the answer provided in the first link suggested above.
However, there is a work around. You could put the
align environment within a
minipage and do something like the following
I believe the
minipage width here is not really a concern if all you're going to do is create the environment for displaying mathematics.
Now, there is some extra code here that makes this look a bit complicated. Namely, the code starting from
\makeatletter. This is to get around a peculiar issue in which the
align* environment expects it's being called midparagraph. Therefore,
align* adds extra whitespace at the top of the environment. For details about this workaround see egreg's solution to Spurious space above align environment at top of page/minipage.