Graphviz Issue Tracker
Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000133graphvizDotpublic2001-06-07 16:082011-04-28 04:02
ReporterDavid Boreham 
Assigned Tonorth 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSx86-Other-Win2k SP2OS Version
Summary0000133: Win32 dot version 1.7c can't write binary output to stdout ?
Description



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



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 \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.
TagsNo tags attached.
AUXILLARY-FILES
DATE-FIXED
FIX-COMMENT 
Same as this one I suspect:
http://www.ee.ethz.ch/~slist/rrd-developers/msg00381.html [^]
FORMER-ID21
INPUT-FILE
OUTPUT-FILE
STATUS-COMMENTFixed
VERSION     1.7c
Attached Files

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
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
Powered by Mantis Bugtracker