Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wasatch!cs.utexas.edu!uunet!mcsun!hp4nl!ruuinf!harald From: harald@ruuinf.cs.ruu.nl (Harald Vogt) Newsgroups: comp.windows.x Subject: Re: Dumping a color Window to PostScript Message-ID: <1531@ruuinf.cs.ruu.nl> Date: 25 Aug 89 13:06:20 GMT Organization: Univ of Utrecht, Dept of CS Lines: 55 Keywords: xwd, xpr, patch for xwd We had the same problem on our HP's. This is my solution: Get the sources of xwd and xpr from the X11v3 release. Install xpr. Make a new command xwdmono which is a patched version of xwd (patches follow). xwdmono dumps only the first plane. Dumping a window now proceeds as follows: xwdmono -xy | xpr -device ps > win.ps Have a nice dump, Harald Vogt ------------------patch to make xwdmono.c ------------------ *** xwd.c Fri Aug 25 13:41:44 1989 --- xwdmono.c Fri Aug 25 13:42:10 1989 *************** *** 211,217 **** bw = nobdrs ? 0 : win_info.border_width; x = absx - win_info.x - bw; y = absy - win_info.y - bw; ! image = XGetImage (dpy, window, x, y, width, height, AllPlanes, format); if (!image) { fprintf (stderr, "%s: unable to get image at %dx%d+%d+%d\n", program_name, width, height, x, y); --- 211,219 ---- bw = nobdrs ? 0 : win_info.border_width; x = absx - win_info.x - bw; y = absy - win_info.y - bw; ! /* HV image = XGetImage (dpy, window, x, y, width, height, AllPlanes, format); ! */ ! image = XGetImage (dpy, window, x, y, width, height, 1L, format); if (!image) { fprintf (stderr, "%s: unable to get image at %dx%d+%d+%d\n", program_name, width, height, x, y); *************** *** 227,233 **** if (debug) outl("xwd: Getting Colors.\n"); ! ncolors = Get_XColors(&win_info, &colors); /* * Inform the user that the image has been retrieved. --- 229,236 ---- if (debug) outl("xwd: Getting Colors.\n"); ! /* HV ncolors = Get_XColors(&win_info, &colors); */ ! ncolors = 0; /* HV to let xpr work right */ /* * Inform the user that the image has been retrieved. -------------------end of patch-----------------------