🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.sun
Article #11412

How to save raster to file from canvas?

#11412
From: Knudsen
Date: Thu, 09 Mar 1989 06:03
16 lines
1357 bytes
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
Technical Details
Message-ID: <9329@ihlpl.ATT.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!bbn!mit-eddie!uw-beaver!rice!sun-spots-request

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!bbn!mit-eddie!uw-beaver!rice!sun-spots-request
From: knudsen@ihlpl.att.com (Knudsen)
Newsgroups: comp.sys.sun
Subject: How to save raster to file from canvas?
Keywords: Windows
Message-ID: <9329@ihlpl.ATT.COM>
Date: 9 Mar 89 06:03:34 GMT
Sender: usenet@rice.edu
Organization: AT&T Bell Laboratories - Naperville, Illinois
Lines: 16
Approved: Sun-Spots@rice.edu
Original-Date: 28 Feb 89 17:45:45 GMT
X-Sun-Spots-Digest: Volume 7, Issue 189, message 11 of 17