Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Imaging With QuickDraw /
Chapter 7 - Pictures / Pictures Reference
QuickDraw and Picture Utilities Routines / Collecting Picture Information


To add a picture to an informational survey of multiple pictures, use the RecordPictInfo function.

FUNCTION RecordPictInfo (thePictInfoID: PictInfoID; 
                        thePictHandle: PicHandle): OSErr;
The ID number--returned by the NewPictInfo function--that identifies the survey to which you are adding the picture. The NewPictInfo function is described on page 7-52.

A handle to the picture being added to the survey.
The RecordPictInfo function adds the picture you specify in the parameter thePictHandle to the survey of pictures identified by the parameter thePictInfoID. Use RecordPictInfo repeatedly to add additional pictures to your survey.

After you have collected all of the pictures you need, use the RetrievePictInfo function, described on page 7-57, to return information about pictures in the survey.

When you ask for color information, RecordPictInfo takes into account only the version 2 and extended version picture opcodes RGBFgCol, RGBBkCol, BkPixPat, PnPixPat, FillPixPat, and HiliteColor. Each occurrence of these opcodes is treated as 1 pixel, regardless of the number and sizes of the objects drawn with that color. If you need an accurate set of colors from a complex picture, create an image of the picture in an offscreen pixel map, and then call the GetPixMapInfo function (described on page 7-49) to obtain color information about that pixel map.

The RecordPictInfo function may move or purge memory.

The trap macro and routine selector for the RecordPictInfo function are
Trap macroSelector

pictInfoIDErr-11001Invalid picture information ID
pictureDataErr-11005Invalid picture data

Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996