converting postscript to some format readable by Tk image formats 
Author Message
 converting postscript to some format readable by Tk image formats

I have the output from a computer algebra package. I would like to tex it,
and then convert the dvi file into a format that Tk can handle via its
image command. At present I do the following :-

a){*filter*}the output
b) dvips -E the dvi file from step a)
c) pstopnm the postscript file from step b)
d) ppmtogif the .ppm file from step c)

Step d) yields a gif which I can then load using the image command in
Tk.

Now this all works, but :-

a) the resulting gif is too big, even though I am latexing using 10pt.
b) its slow, since step c) takes a lot of time
c) the output quality is low

I was thinking that some of you Tk hackers in comp.lang.python and
comp.lang.tcl must have done this kind of thing before. Is there a
quicker way to achieve the above?

thanks

graham

--
                    Though the days come and go
                     There is one thing I know
                  I've still got the blues for you



Thu, 29 Apr 1999 03:00:00 GMT  
 converting postscript to some format readable by Tk image formats



Quote:
>I have the output from a computer algebra package. I would like to tex it,
>and then convert the dvi file into a format that Tk can handle via its
>image command. At present I do the following :-

>a){*filter*}the output
>b) dvips -E the dvi file from step a)
>c) pstopnm the postscript file from step b)
>d) ppmtogif the .ppm file from step c)

>Step d) yields a gif which I can then load using the image command in
>Tk.

You ought to be able to speed this up by skipping step (c) and possibly
step (d) and going directly from DVI to Tk. I have a friend who is
using this, along with a hacked version of TeX, to create a WYSIWYG
text editor using TeX as the formatter (he's a little strange). But
anyway, the DVI format is pretty straightforward, as long as you don't
have any EPS embedded in your DVI files, which I'm guessing you don't
if this is output from a CA package. You might be able to just throw a
whole lot of individual glyphs onto a Tk canvas and skip the bitmap step
entirely. (This probably depends on how well the Tk canvas widget handles
a large number of small bitmaps or glyphs.)

The DVI format is documented in an appendix of one of the TeXBooks ---
volume B, maybe?

--



Sat, 01 May 1999 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. routine to convert date format 0CYYDDDF to format DD/MM/YY or DDMMYY

2. Code to convert images to *.RAW format

3. Converting from JPEG to raw image format

4. PIL: Want to convert images into HSL format

5. Converting Windows Bitmap to X bitmap format so that Tk can display it

6. TK image format support

7. Using xpm format to store color images in your tk source files

8. images formats in tcl/tk?

9. ANNOUNCE: Img 1.0b1: Additional image formats for Tk

10. DOD-STD-2167A in machine-readable format?

11. g77 documentation in easily readable format?

 

 
Powered by phpBB® Forum Software