GNOME Bugzilla – Bug 721851
Commandline export not working for pixbuf and possibly other plugins
Last modified: 2014-03-08 11:19:49 UTC
I use dia to create PNG files like so: $ dia --export=dest.png --filter=pixbuf-png source.dia ** (dia:22315): CRITICAL **: Can't find output format/filter pixbuf-png Same holds true for --filter=jpg. Both filters "pixbuf-png" and "jpg" are advertised by the --help output, so I assume they ought to be functional. When using the export menu in GUI mode, then I see both filters there and functional. No problem on that front. Attached is a somewhat brutal patch that fixes the problem for me. dia might not be used in batch mode without an X server running though.
Not seeing the patch yet, but I guess it will revert part of the fix for bug 155495 with the following comment: 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. Making Dia work without X server is part of the goal, so not to be dropped lightly. IIRC the pixbuf plug-in is the only one requiring an initialized display, so you are seeing intended behavior and not a bug.
Created attachment 265947 [details] [review] Brutal patch
Sorry about the patch, I've managed to add it now. I agree with you, decoupling dia batch mode from a display is a good thing. However cairo PNG export somehow doesn't work here (using gentoo), and JPG is also done by pixbuf. Is there any other option for me than to keep my own dirty private patch?
Just pushed the following fix to master: https://git.gnome.org/browse/dia/commit/?id=c3dcf1eec1b4ef57c45c58410048b77c83ea50dd BTW: please check the cairo export again. Bug 573261 should be finally fixed. And if cairo is good enough for gtk+ it should be godd enough for Dia. If not, please report the issue in a new bug.
Works, thank you.
cherry-picked to dia-0-97 branch https://git.gnome.org/browse/dia/commit/?h=dia-0-97&id=276ce968d91964fcaa64f77826ad14eb4fba555f