|Anonymous | Login||2017-11-22 04:24 EST|
|Main | My View | View Issues | Change Log | Roadmap | My Account|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0000133||graphviz||Dot||public||2001-06-07 16:08||2011-04-28 04:02|
|Platform||OS||x86-Other-Win2k SP2||OS Version|
|Summary||0000133: Win32 dot version 1.7c can't write binary output to stdout ?|
I'm spawning dot to render graphs for me from inside Java servlet-resident code.
All is well, except than when I sucked the PNG binary output from the dot process
into memory and subsequently sent it to the HTTP client, it didn't display.
Upon investigation I discovered that if I run dot two ways, thus:
dot -Tpng -o foo.png bar.dot
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 \x0a\x0d.
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.
|Steps To Reproduce|
Any valid input.
|Tags||No tags attached.|
Same as this one I suspect:
|2011-04-28 04:02||user1||New Issue|
|2011-04-28 04:02||user1||Assigned To||=> Stephen North|
|MantisBT 1.2.5[^] Copyright © 2000 - 2011 MantisBT Group|