After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 155495 - Command line --export produce bad output
Command line --export produce bad output
Status: RESOLVED FIXED
Product: dia
Classification: Other
Component: exports
0.94
Other Linux
: Normal normal
: 0.95
Assigned To: Dia maintainers
Dia maintainers
Depends on:
Blocks:
 
 
Reported: 2004-10-15 11:19 UTC by Simon Josefsson
Modified: 2005-10-08 19:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Bad output generated by dia --export (86.04 KB, image/png)
2004-10-15 11:20 UTC, Simon Josefsson
Details
Dia input file (5.28 KB, application/octet-stream)
2004-10-15 11:21 UTC, Simon Josefsson
Details

Description Simon Josefsson 2004-10-15 11:19:40 UTC
When I convert my *.DIA to *.PNG on the command line, the output is bad
(distorted colors etc).  When done interactively inside Dia, it works fine.  I
get a lot of warnings as well.

You can download the *.dia file from <http://josefsson.org/components.dia>.

jas@latte:~/src/shishi/doc$ dia --export=png --export-to-format=png components.dia

** (dia-python:31351): WARNING **: No attribute type ((nil)) or no data((nil))
in this attribute

(dia-python:31351): GLib-CRITICAL **: file gstrfuncs.c: line 1821
(g_strcasecmp): assertion `s1 != NULL' failed

** (dia-python:31351): WARNING **: Can't color_convert in non-interactive app
(w/o color_init())

** (dia-python:31351): WARNING **: Can't color_convert in non-interactive app
(w/o color_init())

** (dia-python:31351): WARNING **: Can't color_convert in non-interactive app
(w/o color_init())

** (dia-python:31351): WARNING **: Can't color_convert in non-interactive app
(w/o color_init())

** (dia-python:31351): WARNING **: Can't color_convert in non-interactive app
(w/o color_init())

** (dia-python:31351): WARNING **: Can't color_convert in non-interactive app
(w/o color_init())

** (dia-python:31351): WARNING **: Can't color_convert in non-interactive app (w
Comment 1 Simon Josefsson 2004-10-15 11:20:42 UTC
Created attachment 32635 [details]
Bad output generated by dia --export
Comment 2 Simon Josefsson 2004-10-15 11:21:20 UTC
Created attachment 32636 [details]
Dia input file
Comment 3 Hans Breuer 2004-10-31 20:46:39 UTC
There are two workarounds for this behaviour (and is nothing to do 
with your file ;-) :

- disable the pixbuf filter (the one which does not antialias but requires
  color_convert()
- request the exact filter by:
  /opt/bin/dia --export=delme.png  --export-to-format=png-libart render-test.dia

Just applied the following fix to cvs:

2004-10-31  Hans Breuer  <hans@breuer.org>

    * plug-ins/pixbuf/pixbuf.c : when running non interactive
    Dia won't call color_init() as it assumes no display. If
    we have one as tested ourselve we can as well color_init()
    to avoid g_warnings() and produce the right collors.
    Fixes bug #155495.
    
    * app/app-procs.c : try to be a little more helpful
    and correct with regard to the command line options.
    Renamed --export-to-format to --export-filter and some
    other string changes

Comment 4 Hans Breuer 2005-10-08 19:59:58 UTC
Adjusting target to help finding 0.94 dups already fixed