[comp.sys.mac.programmer] Saving a graphic

sandell@ils.nwu.edu (Greg Sandell) (09/07/90)

This is probably a very simple task, but being a relative neophyte
to the Mac, I don't know how you'd do it.

I have a program which writes some graphics in a rectangular area
on the screen, using LineTo() and MoveTo().  This program is
running just fine.  What I want to do is this:  instead of actually
drawing to the screen I want it to draw it to a bitmap or whatever
and save it on the disk (as a PICT, or whatever...what do I want to
use?).  In a later program, I want to grab that file/bitmap/PICT/whatever
and display it instantly on the screen.  I don't care how it's done 
but I don't want to have to have to add a step of running ResEdit
or whatever to install the graphic as a resource into the later
program.  The program should be able to read it in as a file.

I suspect that the task involves CopyBits, but I don't know how
you'd write it to a file, or how you'd read it.

Any help would be appreciated. 

Thanks,
Greg

****************************************************************
* Greg Sandell (sandell@ils.nwu.edu)              Evanston, IL *
* Institute for the Learning Sciences, Northwestern University *
****************************************************************