How to save raster to file from canvas?
Knudsen
knudsen at ihlpl.att.com
Thu Mar 9 16:03:34 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.
I could root thru the *.h files and de-reference a chain of structure
pointers and probably find the backing store bit image. However, there's
a hope expressed in the manual that we will treat Canvasses and Pixwins as
"opaque," meaning that any hacks may break with the next version of
Sunview.
So, is there a gentlemanly way to do this? Yes, I can copy the pixwin to
a pixrect, but this wastes memory and just recursively calls this posting
on pixrects instead of canvasses.
Mike Knudsen Bell Labs(AT&T) att!ihlpl!knudsen
More information about the Comp.sys.sun
mailing list