Carbon


Color Bank Type Constants

Header: PictUtils.h

enum {
    ColorBankIsCustom = -1,
    ColorBankIsExactAnd555 = ,
    ColorBankIs555 = 1
};

Constant descriptions

ColorBankIsCustom

Gathers colors into a custom color bank. Picture Utilities gathers the colors for a picture or a pixel map into a 5-5-5 histogram. When you return the colorBankIs555 constant, the Picture Utilities call your CalcColorTableProcPtr function with a pointer to the color bank (that is, to the 5-5-5 histogram). Your CalcColorTableProcPtr function selects whatever colors it needs from this color bank. Then the Picture Utilities function called by your application returns these colors in a Palette structure, a ColorTable structure, or both, as requested by your application.

ColorBankIsExactAnd555

Gathers exact colors if there are less than 256 unique colors in picture; otherwise gathers colors for picture in a 5-5-5 histogram. If the picture or pixel map has fewer colors than your application requests when it calls a Picture Utilities function, the Picture Utilities function returns all of the colors contained in the color bank. If the picture or pixel map contains more colors than your application requests, the Picture Utilities call your CalcColorTableProcPtr function to select which colors to return.

ColorBankIs555

Gathers colors into a 5-5-5 histogram. Specify colorBankIsCustom constant if you want to implement your own color bank for storing the colors in a picture or a pixel map. For example, because the 5-5-5 histogram that the Picture Utilities provide gathers colors to a resolution of 5 bits per color, your application may want to create a histogram with a resolution of 8 bits per color. When you return the colorBankIsCustom constant, the Picture Utilities call your RecordColorsProcPtr function to create this color bank. The Picture Utilities also call your CalcColorTableProcPtr function to select colors from this color bank.

Your InitPickMethodProcPtr function returns these constants in the colorBankType parameter to indicate the type of color bank your color-picking method.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)