[comp.windows.x] Request for Xwindow to postscript program

haynes@WSL.DEC.COM (06/26/88)

    Does anyone have a program that converts a X bitmap window
    to a postscript file.

Not handy though it would be pretty easy.

    If so, how does it convert colors to b/w?

First, note that X *bitmap* windows are always monochrome, so you can
arbitrarily pick foreground and background as black and white or vice
versa. Dealing with pixmaps is more complex but still no trouble.

You should go to a good basic graphics text like Foley and Van Dam
(Fundamentals of Interactive Computer Graphics) or Newman and Sproull
(Principles of Interactive Computer Graphics) and look at the section
on color, in particular, how to convert from RGB to intensity (gray
scale). Once you have the intensity of the color, you can use any means
you like to convert it to black and white. Thresholding and half-toning
are two popular methods (discussed in the above texts).

Have fun!

	-- Charles

swick@ATHENA.MIT.EDU (Ralph R. Swick) (06/30/88)

     Date:  24 Jun 88 23:42:19 GMT
     From:  rosen@CS.UCLA.EDU

     Does anyone have a program that converts a X bitmap window to a
     postscript file.

I'm having difficulty interpreting your question, but
`xwd | xpr -dev ps` may get you started.