Graphviz Issue Tracker
Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001313graphvizDotpublic2008-05-04 09:212011-04-28 04:03
ReporterPeter Landgren 
Assigned Toellson 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSx86-Linux-2.6.24.4OS Version
Summary0001313: cannot generate postscript file from dot file; png, jpg, svg pdf works.
Description



I have used commands like
dot -Tpdf -ot1.pdf rel_graph.dot
to produce different output formats.
I get correct output for:
png, jpg, svg, pdf
but not for
ps
using the same dot -file.
I attache an archive with the files.



I get the same problem with 2.18.
Additional Information
[ellson] Something happened with the attachments to your bug report. I can extract the rel_graph.dot
but not the png images. Could you resend as individual attachments please?

And could you add some more description on what goes wrong with -Tps output?

If you try -Tps:cairo instead, is that any better?

[ellson]
This was likely a problem I fixed recently with loading RGB png images. It was previously looking for only RGBA images.
I've just isolated the patch from some unrelated stuff in case you need to apply it to graphviz-1.18. Attached.

<CD>

Index: plugin/pango/gvloadimage_pango.c
===================================================================
RCS file: /home/cvsroot/graphviz2/plugin/pango/gvloadimage_pango.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- plugin/pango/gvloadimage_pango.c 4 May 2008 17:11:49 -0000 1.12
+++ plugin/pango/gvloadimage_pango.c 4 May 2008 17:13:03 -0000 1.13
@@ -1,4 +1,4 @@
-/* $Id: gvloadimage_pango.c,v 1.12 2008/05/04 17:11:49 ellson Exp $ $Revision: 1.12 $ */
+/* $Id: gvloadimage_pango.c,v 1.13 2008/05/04 17:13:03 ellson Exp $ $Revision: 1.13 $ */
 /* vim:set shiftwidth=4 ts=8: */
 
 /**********************************************************
@@ -101,12 +101,17 @@
 static void pango_loadimage_ps(GVJ_t * job, usershape_t *us, boxf b, boolean filled)
 {
     cairo_surface_t *surface; /* source surface */
+ cairo_format_t format;
     FILE *out = job->output_file;
     int X, Y, x, y, stride;
     unsigned char *data, *ix, alpha, red, green, blue;
 
     surface = cairo_loadimage(job, us);
- if (surface && (cairo_image_surface_get_format(surface) == CAIRO_FORMAT_ARGB32)) {
+ if (surface) {
+ format = cairo_image_surface_get_format(surface);
+ if ((format != CAIRO_FORMAT_ARGB32) && (format != CAIRO_FORMAT_RGB24))
+ return;
+
     X = cairo_image_surface_get_width(surface);
     Y = cairo_image_surface_get_height(surface);
     stride = cairo_image_surface_get_stride(surface);
</CD>
TagsNo tags attached.
AUXILLARY-FILES
DATE-FIXED
FIX-COMMENT
FORMER-ID1346
INPUT-FILEhttp://www.graphviz.org/bugs/b1346.dot [^]
OUTPUT-FILEhttp://www.graphviz.org/bugs/b1346.ps [^]
STATUS-COMMENTFixed (4 May 2008)
VERSION     2.16.1
Attached Files

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2011-04-28 04:03 user1 New Issue
2011-04-28 04:03 user1 Assigned To => user695


MantisBT 1.2.5[^]
Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker