How to save raster to file from canvas
Hsuan Chang
hsc at vuse.vanderbilt.edu
Thu Mar 23 20:23:10 AEST 1989
>I'd like some advice with what seems like a simple idea. Given a canvas
>with its pixwin, how can I just get at the raw bits of the image so as to
>save it to a disk file and later reload it into the same pixwin? Note
>that the rectangle size and shape will not change.
Well, you might want to use the pixrect substructure of the pixwin
directly. It's accessable via pw->pw_prretained, which is a pointer to a
pixrect structure. It has everything that you have on the canvas. You
can then go in to access the raw data part (one dimensional array of type
*short*, each holding two pixels of 8 bits each).
Hope this helps.
Hsuan Chang hsc at vuse.vanderbilt.edu
Image Processing Lab, Computer Science Department
Vanderbilt University, Nashville, Tn 37235
More information about the Comp.sys.sun
mailing list