For now, the best way to do this is to use a postscript converter such as
the netpbm pstopnm + whatever combination. I was thinking about what
would be needed to get proper bitmap output from dia for web pages and the
like.
What I was thinking of was creating a thin band GdkPixmap -- say the
diagram's width and 25 to 50 pixels high. The top band of the diagram
would be rendered to the pixmap by the standard gdk renderer. The
gdk_image_get() function can be used to create a GdkImage from the
contents of the GdkPixmap, from which we can get the pixel values from the
image with gdk_image_get_pixel(). The band of image data could be passed
off to the image library (eg. libpng or libtiff). The process would be
repeated for the other bands in the image.
You would want to be able to tune the band height. If the bands are
large, more memory is used. If they are small, more rendering may be
required by the X server.
On the other hand, it may be possible to get nice antialiased bitmap
output by using libart. This would also remove the dependence on an X
server while doing the conversion, which may be a plus.
Of couse, there is also the SVG export filter in dia, so when the web
browsers catch up, you will be able to insert scalable dia drawings in
your web page, which would be a fraction of the size. AFAIK, recent
versions of IE support the (rejected) VML standard, but there is no export
filter for it (and I am not going to write one -- look at the
specification document on www.w3.org to see why).
James.
--
Email: [EMAIL PROTECTED]
WWW: http://www.daa.com.au/~james/
On Wed, 27 Oct 1999, Jeff Taylor wrote:
> I need to get a UML diagram from Dia to GIF or PNG format to put on my
> Web page. Anyone have some suggestions?
>
> TIA,
> Jeffrey
>
>