converting a DIA file to PNG in Batch
- From: Basile STARYNKEVITCH <basile starynkevitch cea fr>
- To: dia-list gnome org
- Subject: converting a DIA file to PNG in Batch
- Date: Thu, 25 Jul 2002 15:29:18 +0200
Dear All,
is there a clean way to convert a DIA file to PNG in batch mode?
The obvious answer
dia -e foo.png foo.dia
does not suit me, because it does not work in batch mode.
To run this command, you need an X11 display:
bash -c 'unset DISPLAY; dia -e foo.png foo.dia'
Gtk-WARNING **: cannot open display:
and there is no foo.png file in the directory.
Of course, if there is a display (i.e. inside an xterm with a DISPLAY
environment variable set sensibly) the command works.
Ok, why do I need a batch converter:
I consider using dia (instead of xfig) to edit some figures in a
document. This document is in LaTeX processed by both latex and hevea
(a LaTeX to HTML converted coded in Ocaml). For curious people, the
document is for the POESIA opensource content filter project - see
http://www.poesia-filter.org/ for more details about POESIA.
The figures and the document are managed thru CVS, and each night a
batch script (initiated by crontab) checkout the PoesiaDoc directory,
run make, and copy the resulting *html *ps *gif *png files into a Web
page. This is a batch script running nightly and obviously does not
have any X11 server.
As a hack, I could in my Makefile start up a Xvfb virtual X11 server,
but I feel it is not worth it.
I tried (with the latest CVS) to replace in file app/app_procs.c
(rev. 1.94) the line 320
gtk_init (&argc, &argv);
with
dia_is_interactive = gtk_init_check (&argc, &argv);
but it is not enough to make it. I've got a core dump
#0 0x40245419 in gdk_rgb_set_min_colors () from /usr/lib/libgdk-x11-2.0.so.0
#1 0x40248e8e in gdk_rgb_get_colormap () from /usr/lib/libgdk-x11-2.0.so.0
#2 0x080c4ddb in dia_image_init () at dia_image.c:44
#3 0x08072486 in app_init (argc=4, argv=0xbffffb04) at app_procs.c:380
#4 0x080a267b in main (argc=0, argv=0x0) at main.c:36
Any suggestions?
--
N.B. Any opinions expressed here are only mine, and not of my organization.
N.B. Les opinions exprimees ici me sont personnelles et n engagent pas le CEA.
---------------------------------------------------------------------
Basile STARYNKEVITCH ---- Commissariat à l Energie Atomique * France
DRT/LIST/DTSI/SLA * CEA/Saclay b.528 (p111f) * 91191 GIF/YVETTE CEDEX
phone:+33 1,6908.6055; fax: 1,6908.8395 home: 1,4665.4553; mobile: 6,8501.2359
work email: Basile point Starynkevitch at cea point fr
home email: Basile at Starynkevitch point net
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]