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


Use the RetrievePictInfo function to return information about all the pictures, pixel maps, and bitmaps included in a survey.

FUNCTION RetrievePictInfo (thePictInfoID: PictInfoID; 
                          VAR thePictInfo: PictInfo; 
                          colorsRequested: Integer): OSErr;
The ID number--returned by the NewPictInfo function--that identifies the survey of pictures, pixel maps, and bitmaps. The NewPictInfo function is described on page 7-52.
A pointer to the PictInfo record that holds information about the pictures or images in the survey. The PictInfo record is described on page 7-31.
From 1 to 256, the number of colors you want returned in the ColorTable or Palette record included in the PictInfo record.
In a PictInfo record that you point to in the parameter thePictInfo, the RetrievePictInfo function returns information about all of the pictures and images collected in the survey that you specify in the parameter thePictInfoID.

After using the NewPictInfo function to create a new survey, and then using RecordPictInfo to add pictures to your survey and RecordPixMapInfo to add pixel maps and bitmaps to your survey, you can call RetrievePictInfo.

When you are finished with the information in the PictInfo record, be sure to dispose of it. You can dispose of the Palette record by using the DisposePalette procedure. You can dispose of the ColorTable record by using the DisposeCTable procedure. You can dispose of other allocations with the DisposeHandle procedure. You should also use the DisposePictInfo function (described next) to dispose of the private data structures created by the NewPictInfo function.

The RetrievePictInfo function may move or purge memory.

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

pictInfoIDErr-11001Invalid picture information ID
colorsRequestedErr-11004Number out of range or greater than that passed to NewPictInfo
The DisposePalette procedure is described in Advanced Color Imaging on the Mac OS. The DisposeCTable procedure is described in the chapter "Color QuickDraw" in this book. The DisposeHandle procedure is described in the chapter "Memory Manager" in Inside Macintosh: Memory.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996