Important: The information in this document is obsolete and should not be used for new development.
Collecting Picture Information
You can use the Picture Utilities routines described in this section to gather extensive information about pictures and to gather color information about pixel maps and bitmaps. On an 8-bit indexed device, for example, you might want your application to determine the 256 most-used colors in a picture composed of millions of colors. Your application can then use the Palette Manager (as described in Advanced Color Imaging on the Mac OS) to make these colors available for the window in which your application needs to draw the picture.You use the
GetPictInfo
function to gather information about a single picture, and you use theGetPixMapInfo
function to gather color information about a single pixel map or bitmap. Each of these functions returns color and resolution information in aPictInfo
record. APictInfo
record for a picture also contains additional information, such as the resolution of the picture, and information about the fonts and comments contained in the picture.You can also survey multiple pictures, pixel maps, and bitmaps for this information. Use the
NewPictInfo
function to begin collecting pictures, pixel maps, and bitmaps for your survey. You also useNewPictInfo
to specify how you would like the color, comment, and font information for the survey returned to you.To add the information for a picture to your survey, use the
RecordPictInfo
function. To add the information for a pixel map or a bitmap to your survey, use theRecordPixMapInfo
function. TheRetrievePictInfo
function collects the information about the pictures, pixel maps, and bitmaps that you have added to the survey. TheRetrievePictInfo
function returns this information in aPictInfo
record.When you are finished with this information, use the
DisposePictInfo
function to dispose of the private data structures allocated by theNewPictInfo
function.
- Note
- The Picture Utilities also collect information from black-and-white pictures and bitmaps, and they are supported in System 7 even by computers running only basic QuickDraw. However, when collecting color information on a computer running only basic QuickDraw, the Picture Utilities return
NIL
instead of a handle to aPalette
orColorTable
record.
Subtopics
- GetPictInfo
- GetPixMapInfo
- NewPictInfo
- RecordPictInfo
- RecordPixMapInfo
- RetrievePictInfo
- DisposePictInfo