home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.windows.x
- Path: sparky!uunet!cs.utexas.edu!convex!seas.smu.edu!rrb
- From: rrb@seas.smu.edu (Robert R. Bailey)
- Subject: Xview and XGetImage problem
- Message-ID: <1992Aug29.023505.21665@seas.smu.edu>
- Sender: news@seas.smu.edu (USENET News System)
- Nntp-Posting-Host: star0.seas.smu.edu
- Organization: School of Engineering and applied science; S.M.U.; Dallas, Tx
- Date: Sat, 29 Aug 1992 02:35:05 GMT
- Lines: 34
-
- I am working with a 7-bit gray scale image and an overlay of several colors
- using XView on a Sun SPARC. After displaying the image and generating the
- overlay, I can't seem to read the resulting image back so that I can write
- it out to a rasterfile.
-
- The following is a summary of how I display the image:
- dsply = (Display *) xv_get( canvas, XV_DISPLAY);
- win = (Drawable) xv_get( canvas_point_window( canvas), XV_XID);
- set color map;
- xi = XCreateImage( dsply, default_visual, 8, ZPixmap, 0, data,
- width, height, 8, width);
- XPutImage( dsply, win, gc, xi, 0,0,0,0, width, height);
-
- Now, I draw on top of the image:
- XDrawLine( dsply, win, gc, x,y,x,y);
- etc.;
-
- I can scroll around and draw some more.
- Now I want to take the resulting modified image and write it to a rasterfile.
- (If I can get it to an XImage, I can to it.) I tried:
- new_xi = XGetImage( dsply, win, 0,0, width,height, AllPlanes, ZPixmap);
-
- But this does not work. I can only get that part of the image that is
- currently displayed in the window, which is smaller than the whole
- (1024 X 1024) image.
-
- How do I get the whole image?
-
- Thanks for any suggestions.
-
- Bob Bailey
- rrb@seas.smu.edu
- --
- From: Bob Bailey = rrb@seas.smu.edu
-