GetPictInfo
colorsRequested, colorPickMethod, version);
PicHandle thePictHandle; is a handle to the picture to be examined PictInfo *thePictInfo; a pointer to the picture information record short verb; indicates whether you want colors from the
image returned as a palette or a color table
short colorsRequested; the number of colors you want
short colorPickMethod; indicates the color-sampling method.
short version; Set the version parameter to 0.
The GetPictInfo function examines a single picture, returning information in the picture information record.
thePictHandle a handle to the picture to be examined
thePictInfo a pointer to the picture information record that will hold the
information.
verb indicates whether you want colors from the image returned as a
palette or a color table by setting the returnPalette or
returnColorTable bit of the verb. You may set both bits, in which
case you will get both a color table and a palette. You can also specify
suppressBlackAndWhite in the verb parameter to request that black
and white not be counted when surveying colors. (Since the
this technique can be useful when you are sampling colors destined
for a palette or the screen: ask for the number of colors you want
minus 2, and suppress black and white.). With the GetPictInfo function, you can also use the verb parameter to request comment or
font information, which you specify by recordComments or
colorsRequested specifies the number of colors you want returned in the palette or
color table; it may be from 1 to 256.
colorPickMethod indicates the color-sampling method. Its value can be systemMethod, popularMethod, medianMethod, or the resource ID of your own
method.
version Set the version parameter to 0.
noErr (0) No error
pictInfoVersionErr (-11000) Version number not 0
pictInfoVerbErr (-11002) Invalid verb combination specified
cantLoadPickMethodErr (-11003) Custom pick method not in resource chain
colorsRequestedErr (-11004) Number out of range or greater than passed to
Invalid picture data
Notes: GetPictInfo can potentially move and purge memory.