home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / windows / x / 15844 < prev    next >
Encoding:
Text File  |  1992-08-29  |  1.6 KB  |  46 lines

  1. Newsgroups: comp.windows.x
  2. Path: sparky!uunet!cs.utexas.edu!convex!seas.smu.edu!rrb
  3. From: rrb@seas.smu.edu (Robert R. Bailey)
  4. Subject: Xview and XGetImage problem
  5. Message-ID: <1992Aug29.023505.21665@seas.smu.edu>
  6. Sender: news@seas.smu.edu (USENET News System)
  7. Nntp-Posting-Host: star0.seas.smu.edu
  8. Organization: School of Engineering and applied science; S.M.U.; Dallas, Tx
  9. Date: Sat, 29 Aug 1992 02:35:05 GMT
  10. Lines: 34
  11.  
  12. I am working with a 7-bit gray scale image and an overlay of several colors
  13. using XView on a Sun SPARC.  After displaying the image and generating the
  14. overlay, I can't seem to read the resulting image back so that I can write
  15. it out to a rasterfile.
  16.  
  17. The following is a summary of how I display the image:
  18.   dsply = (Display *) xv_get( canvas, XV_DISPLAY);
  19.   win = (Drawable) xv_get( canvas_point_window( canvas), XV_XID);
  20.   set color map;
  21.   xi = XCreateImage( dsply, default_visual, 8, ZPixmap, 0, data,
  22.     width, height, 8, width);
  23.   XPutImage( dsply, win, gc, xi, 0,0,0,0, width, height);
  24.  
  25. Now, I draw on top of the image:
  26.   XDrawLine( dsply, win, gc, x,y,x,y); 
  27.   etc.;
  28.  
  29. I can scroll around and draw some more.
  30. Now I want to take the resulting modified image and write it to a rasterfile.
  31. (If I can get it to an XImage, I can to it.)  I tried:
  32.   new_xi = XGetImage( dsply, win, 0,0, width,height, AllPlanes, ZPixmap);
  33.  
  34. But this does not work.  I can only get that part of the image that is
  35. currently displayed in the window, which is smaller than the whole
  36. (1024 X 1024) image.
  37.  
  38. How do I get the whole image?
  39.  
  40. Thanks for any suggestions.
  41.  
  42. Bob Bailey
  43. rrb@seas.smu.edu
  44. -- 
  45. From: Bob Bailey = rrb@seas.smu.edu
  46.