Number: 1054
Title: Problems with images when asking for an SVG output
Submitter: Emmanuel Pietriga
Date: Fri Dec 8 03:06:39 2006
Subsys: Dot
Version: 2.12
System: *-*-WinXP
Severity: major
Problem:
A ZGRViewer user reported that there was a problem with images used as node shapes. I traced down the problem to the SVG output of dot.

The problem is different depending on the version of GV.

With 2.8, only half of the node images are displayed, namely those inside HTML tables. The standalone ones declared through shapefile are not displayed at all (I checked the SVG serialization, they are not declared at all). But those that are displayed are correctly located w.r.t other elements in the graph. See [1] for a screen capture of the SVG rendering by ZGRViewer.

For comparison, [2] shows the correct output obtained by asking dot to generate a PNG image instead of an SVG document.

With 2.12, the SVG document contains all images, but as you can see in [3] there vertical coordinate is inverted. This is the ZGRViewer rendering. When I try to look at this SVG document in either Adobe Illustrator or Firefox, the images simply don't show at all.

The command lines used were :


dot -Tsvg input.dot -o output.svg
dot -Tpng input.dot -o output.png

[1] http://www.lri.fr/~pietriga/2006/12/gv2_8_svg.png [2] HREF=http://www.lri.fr/~pietriga/2006/12/gv_2_8_png.png [3] http://www.lri.fr/~pietriga/2006/12/gv2_12_svg.png


Input file:
b1054.dot
Output file: b1054.png
Comments:
I can provide you with image.png, I just didn't know how to upload it through the bug report form.
Fix: In 2.12, it is probably just a sign error in the Y coordinate of image elements.
Owner: *
Status: *