clyne@redcloud.ucar.edu (John Clyne) (10/07/89)
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. thanks - jc John Clyne (clyne@ncar.ucar.edu) c/o National Center for Atmospheric Research P.O. Box 3000 Boulder, Colorado 80307 (303) 497-1236 %%% Its a small world. But I wouldn't want to paint it %%% S. Wright %%% %%%
madd@bu-cs.BU.EDU (Jim Frost) (10/13/89)
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