Important: The information in this document is obsolete and should not be used for new development.
Collecting Picture InformationYou 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
GetPictInfofunction to gather information about a single picture, and you use the
GetPixMapInfofunction to gather color information about a single pixel map or bitmap. Each of these functions returns color and resolution information in a
PictInforecord 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
NewPictInfofunction to begin collecting pictures, pixel maps, and bitmaps for your survey. You also use
NewPictInfoto 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
RecordPictInfofunction. To add the information for a pixel map or a bitmap to your survey, use the
RetrievePictInfofunction collects the information about the pictures, pixel maps, and bitmaps that you have added to the survey. The
RetrievePictInfofunction returns this information in a
When you are finished with this information, use the
DisposePictInfofunction to dispose of the private data structures allocated by the
- 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
NILinstead of a handle to a