Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!bu-cs!madd From: madd@bu-cs.BU.EDU (Jim Frost) Newsgroups: comp.windows.x Subject: Re: pixmap to disk Message-ID: <40202@bu-cs.BU.EDU> Date: 12 Oct 89 20:00:54 GMT Reply-To: madd@cs.bu.edu (Jim Frost) Organization: Software Tool & Die Lines: 32 In article <4630@ncar.ucar.edu> clyne@ncar.ucar.edu (John Clyne) writes: |Does anyone have a utility for dumping a pixmap to disk? i.e. the analogue |to xwd for windows. We want to create to create super high resolution raster |images (on the order of 3k x 3k) for our dicomed recorders. Any pointers |would be much appreciated. I don't have an actual utility but you can make one quickly (versus a quick one) with XGetImage much as follows: ximage= XGetImage(disp, pixmap, 0, 0, pixmap_width, pixmap_height, AllPlanes, ZPixmap); I prefer this ZPixmap over XYPixmap because it's a lot easier to convert to native pixel values using it. Once you have the image you need only loop through the XImage data area (taking into account whatever byte-order and padding the image has) and write it out in your favorite format. If you like I can write you one that dumps a colormap into a Sun rasterfile (I have code for rasterfile manipulation hanging around) which does the above function for a given pixmap and colormap. Interested? If so, email me at madd@cs.bu.edu. For others doing image work, I have an image display utility nearly complete which reads several image formats and performs a variety of simple image processing functions on them (particularly those needed to display images on inferior displays). I'd be happy to send it to interested parties. jim frost software tool & die madd@std.com