Upon investigation I discovered that if I run dot two ways, thus:
dot -Tpng -o foo.png bar.dot
and
dot -Tpng bar.dot > baz.png
then foo.png and baz.png are different !
And baz.png is the same as my version I get from the spawned process.
Looking at the data, I think I see x0a translated to x0ax0d.
So...my theory is that the stdout file needs to be set to binary mode (someone familiar with Win32 will know about the evil binary/text mode fiasco) when the data type is a binary one (e.g. PNG, JPEG).
I looked at the source code and can't see any place where the file mode is set. But fear and loathing of the build environment prevents me from trying a fix myself just yet.
For now I've hacked my code to sent the image to a file which I then read back into memory.
Thanks in advance for your help.
Fantastic piece of software, BTW.
Input:
Fix:
Any valid input.
Same as this one I suspect:
http://www.ee.ethz.ch/~slist/rrd-developers/msg00381.html
Owner: north
Status: Fixed