[comp.sys.mac.programmer] N READPICT => SOMETHING I CA

ben@rover.bsd.uchicago.edu (03/09/89)

I'M LOOKING FOR SOMETHING THAT CAN CONVERT THE "RESOURCE" TYPE PICT INTO
SOMETHING THAT I CAN READ WITH MAC PAINT OR DRAW OR SOMETHING IS THERE A WAY
TO DO THIS ????

THANKS 
BEN HERMAN
SORRY ABOUT THE LOOKS OF THIS ARTICLEW 

jackiw@cs.swarthmore.edu (Nick Jackiw) (03/10/89)

In article <2194@tank.uchicago.edu> ben@rover.bsd.uchicago.edu writes:
> 
> I'M LOOKING FOR SOMETHING THAT CAN CONVERT THE "RESOURCE" TYPE PICT INTO
> SOMETHING THAT I CAN READ WITH MAC PAINT OR DRAW OR SOMETHING IS THERE A WAY
> TO DO THIS ????
> 
> BEN HERMAN

Go into ResEdit, open the file with the PICT resource, COPY that resource
onto the Clipboard; go into MacPaint, paste the PICT; and save it. (This
method also works with MacDraw!) Or do you need to write a PROGRAM to do
it?  If so, figure out how big the PICT's enclosing rect is (thePic^^.frame,
or something like that). Allocate an offscreen bitmap big enough to hold
that rectangle at the desired screen depth. SetPortBits() to your bitmap.
EraseRect the entire thing (unless you allocated it with pre-zeroing);
then DrawPicture(thePic).  Now you have a bitmap version of the Picture
instead of a Quickdraw version of it. TechNote#86 describes how to save
this in a MacPaint compatible format.

Hope this helps.


-- 
+-------------------+-jackiw@cs.swarthmore.edu / !rutgers!bpa!swatsun!jackiw-+
|  nicholas jackiw  | jackiw%campus.swarthmore.edu@swarthmr.bitnet           |
+-------------------+-VGP/MathDept/Swarthmore College, Swarthmore, PA 19081--+
"Ah...I've got this CHRONIC pain."                             _True Believer_