< Previous PageNext Page > Hide TOC

Legacy Documentclose button

Important: The Picture Utilities are deprecated as of Mac OS X v10.4. The replacement API for all QuickDraw technologies is Quartz 2D (Core Graphics). See Quartz Programming Guide for QuickDraw Developers for strategies to replace QuickDraw code with Quartz 2D..

Deprecated Picture Utilities Reference (Not Recommended) Functions

A function identified as deprecated has been superseded and may become unsupported in the future.

Deprecated in Mac OS X v10.4

DisposeCalcColorTableUPP

Disposes of a universal procedure pointer (UPP) to a color table calculation callback. (Deprecated in Mac OS X v10.4. Use Quartz 2D instead; see Quartz Programming Guide for QuickDraw Developers.)

void DisposeCalcColorTableUPP (
   CalcColorTableUPP userUPP
);

Parameters
userUPP

The universal procedure pointer.

Discussion

For more information, see CalcColorTableProcPtr.

Special Considerations

Because Quartz 2D uses an entirely different approach to graphics than used by QuickDraw, there is no one-to-one correlation between QuickDraw and Quartz 2D functions. However, because Quartz offers many new features and improved performance compared to QuickDraw, it is worthwhile making the effort to convert your graphics code to Quartz.

Availability
Declared In
PictUtils.h

DisposeDisposeColorPickMethodUPP

Disposes of a universal procedure pointer (UPP) to a method disposal callback. (Deprecated in Mac OS X v10.4. Use Quartz 2D instead; see Quartz Programming Guide for QuickDraw Developers.)

void DisposeDisposeColorPickMethodUPP (
   DisposeColorPickMethodUPP userUPP
);

Parameters
userUPP

The universal procedure pointer.

Discussion

For more information, see DisposeColorPickMethodProcPtr.

Special Considerations

Because Quartz 2D uses an entirely different approach to graphics than used by QuickDraw, there is no one-to-one correlation between QuickDraw and Quartz 2D functions. However, because Quartz offers many new features and improved performance compared to QuickDraw, it is worthwhile making the effort to convert your graphics code to Quartz.

Availability
Declared In
PictUtils.h

DisposeInitPickMethodUPP

Disposes of a universal procedure pointer (UPP) to a method initialization callback. (Deprecated in Mac OS X v10.4. Use Quartz 2D instead; see Quartz Programming Guide for QuickDraw Developers.)

void DisposeInitPickMethodUPP (
   InitPickMethodUPP userUPP
);

Parameters
userUPP

The universal procedure pointer.

Discussion

For more information, see InitPickMethodProcPtr.

Special Considerations

Because Quartz 2D uses an entirely different approach to graphics than used by QuickDraw, there is no one-to-one correlation between QuickDraw and Quartz 2D functions. However, because Quartz offers many new features and improved performance compared to QuickDraw, it is worthwhile making the effort to convert your graphics code to Quartz.

Availability
Declared In
PictUtils.h

DisposePictInfo

Disposes of the private data structures allocated by the NewPictInfo function. (Deprecated in Mac OS X v10.4. Use Quartz 2D instead; see Quartz Programming Guide for QuickDraw Developers.)

OSErr DisposePictInfo (
   PictInfoID thePictInfoID
);

Parameters
thePictInfoID

The unique identifier returned by NewPictInfo.

Return Value

A result code. See “Picture Utilities Result Codes.”

Discussion

The DisposePictInfo function does not dispose of any of the handles returned to you in a PictInfo structure by the RetrievePictInfo function. Instead, you can dispose of a Palette structure by using the DisposePalette function. You can dispose of a ColorTable structure by using the DisposeCTable function. Dispose of other allocations with the DisposeHandle function.

Use this function when you are finished gathering information from a survey of pictures, pixel maps, or bitmaps.

Special Considerations

Because Quartz 2D uses an entirely different approach to graphics than used by QuickDraw, there is no one-to-one correlation between QuickDraw and Quartz 2D functions. However, because Quartz offers many new features and improved performance compared to QuickDraw, it is worthwhile making the effort to convert your graphics code to Quartz.

Availability
Declared In
PictUtils.h

DisposeRecordColorsUPP

Disposes of a universal procedure pointer (UPP) to a color recording callback. (Deprecated in Mac OS X v10.4. Use Quartz 2D instead; see Quartz Programming Guide for QuickDraw Developers.)

void DisposeRecordColorsUPP (
   RecordColorsUPP userUPP
);

Parameters
userUPP

The universal procedure pointer.

Discussion

For more information, see RecordColorsProcPtr.

Special Considerations

Because Quartz 2D uses an entirely different approach to graphics than used by QuickDraw, there is no one-to-one correlation between QuickDraw and Quartz 2D functions. However, because Quartz offers many new features and improved performance compared to QuickDraw, it is worthwhile making the effort to convert your graphics code to Quartz.

Availability
Declared In
PictUtils.h

GetPictInfo

Gathers information about a single picture. (Deprecated in Mac OS X v10.4. Use Quartz 2D instead; see Quartz Programming Guide for QuickDraw Developers.)

OSErr GetPictInfo (
   PicHandle thePictHandle,
   PictInfo *thePictInfo,
   short verb,
   short colorsRequested,
   short colorPickMethod,
   short version
);

Parameters
thePictHandle

A handle to a picture.

thePictInfo

On return, a pointer to a PictInfo structure, which holds information about the picture. Initially, all of the fields in the new PictInfo structure are set to NULL. Relevant fields are set to appropriate values depending on the information you request using the GetPictInfo function.

This function collects information from black-and-white pictures and bitmaps, and is supported in System 7 even by computers running only basic QuickDraw. However, when collecting color information on a computer running only basic QuickDraw, the function returns NULL instead of a handle to a Palette or ColorTable structure.

verb

A value indicating what type of information you want GetPictInfo to return in the PictInfo structure. See “Color Information Type” for a description of the values you can use in this parameter.

You can specify whether you want color information (in a ColorTable structure, a Palette structure, or both), whether you want picture comment information, and whether you want font information. If you want color information, be sure to use the colorPickMethod parameter to specify the method by which to select colors.

Because the Palette Manager adds black and white when creating a Palette structure, you can specify the number of colors you want minus 2 in the colorsRequested parameter and specify the suppressBlackAndWhite constant in the verb parameter when gathering colors destined for a Palette structure or a screen.

colorsRequested

From 1 to 256, the number of colors you want in the ColorTable or Palette structure returned via the PictInfo structure. If you are not requesting colors (that is, if you pass the recordComments or recordFontInfo constant in the verb parameter), specify 0 in this parameter.

colorPickMethod

The method by which colors are selected for the ColorTable or Palette structure returned via the PictInfo structure. See “Color Selection Method” for a description of the values you can use here.

You can also create your own color-picking method in a resource file of type 'cpmt' and pass its resource ID in the colorPickMethod parameter. The resource ID must be greater than 127.

version

Always set this parameter to 0.

Return Value

A result code. See “Picture Utilities Result Codes.”

Discussion

The Picture Utilities provide two color-picking methods: one (specified by the popularMethod constant) that gives you the most frequently used colors and one (specified by the medianMethod constant) that gives you the widest range of colors. Each has advantages in different situations. For example, suppose the picture of a forest image contains 400 colors, of which 300 are greens, 80 are browns, and the rest are a scattering of golden sunlight effects. If you ask for the 250 most used colors, you will probably receive all greens. If you ask for a range of 250 colors, you will receive an assortment stretching from the greens and golds to the browns, including colors in between that might not actually appear in the image. If you specify the systemMethod constant, the Picture Utilities choose the method; currently they always choose popularMethod. You can also supply a color-picking method of your own.

If your application uses more than one color-picking method, it should present the user with a choice of which method to use.

When you are finished with the information in the PictInfo structure, use the Memory Manager function DisposeHandle to dispose of the PictInfo, CommentSpec, and FontSpec structures. Dispose of the Palette structure by using the DisposePalette function. Dispose of the ColorTable structure by using the DisposeCTable function.

Special Considerations

Because Quartz 2D uses an entirely different approach to graphics than used by QuickDraw, there is no one-to-one correlation between QuickDraw and Quartz 2D functions. However, because Quartz offers many new features and improved performance compared to QuickDraw, it is worthwhile making the effort to convert your graphics code to Quartz.

When you ask for color information, GetPictInfo takes into account only the version 2 and extended version 2 picture opcodes RGBFgCol, RGBBkCol, BkPixPat, PnPixPat, FillPixPat, HiliteColor and pixel map or bitmap data. Each occurrence of these opcodes is treated as 1 pixel, regardless of the number and sizes of the objects drawn with that color. If you need an accurate set of colors from a complex picture, create an image of the picture in an offscreen pixel map, and then call the GetPixMapInfo function to obtain color information about that pixel map.

The GetPictInfo function returns a bit depth of 1 on QuickTime-compressed 'PICT' files. However, when QuickTime is installed, QuickTime decompresses and displays the image correctly.

Availability
Declared In
PictUtils.h

GetPixMapInfo

Gathers color information about a single pixel map or bitmap. (Deprecated in Mac OS X v10.4. Use Quartz 2D instead; see Quartz Programming Guide for QuickDraw Developers.)

OSErr GetPixMapInfo (
   PixMapHandle thePixMapHandle,
   PictInfo *thePictInfo,
   short verb,
   short colorsRequested,
   short colorPickMethod,
   short version
);

Parameters
thePixMapHandle

A handle to a pixel map or bitmap.

thePictInfo

On return, a pointer to a PictInfo structure, which holds information about a pixel map or bitmap. Initially, all of the fields in a new PictInfo structure are set to NULL. Relevant fields are set to appropriate values depending on the information you request using the GetPixMapInfo function.

This function also collects information from black-and-white pictures and bitmaps, and is supported in System 7 even by computers running only basic QuickDraw. However, when collecting color information on a computer running only basic QuickDraw, this function returns NULL instead of a handle to a Palette or ColorTable structure.

verb

A value indicating whether you want color information returned in a ColorTable structure, a Palette structure, or both. You can also request that black and white not be included among the returned colors. See “Color Information Type” for a description of the values you can use here.

Because the Palette Manager adds black and white when creating a Palette structure, you can specify the number of colors you want minus 2 in the colorsRequested parameter and specify the constant suppressBlackAndWhite in the verb parameter when gathering colors destined for a Palette structure or a screen.

colorsRequested

From 1 to 256, the number of colors you want in the ColorTable or Palette structure returned via the PictInfo structure.

colorPickMethod

The method by which colors are selected for the ColorTable or Palette structure returned via the PictInfo structure. See “Color Selection Method” for a description of the values you can use here.

You can also create your own color-picking method in a resource file of type 'cpmt' and pass its resource ID in the colorPickMethod parameter. The resource ID must be greater than 127.

version

Always set this parameter to 0.

Return Value

A result code. See “Picture Utilities Result Codes.”

Discussion

The Picture Utilities provide two color-picking methods: one that gives you the most frequently used colors and one that gives you the widest range of colors. If you specify the systemMethod constant, the Picture Utilities choose that method. Currently they always choose popularMethod. You can also supply a color-picking method of your own.

When you are finished with the information in the PictInfo structure, be sure to dispose of it. Use the Memory Manager function DisposeHandle to dispose of the PictInfo structure. Dispose of the Palette structure by using the DisposePalette function. Dispose of the ColorTable structure by using the DisposeCTable function.

Special Considerations

Because Quartz 2D uses an entirely different approach to graphics than used by QuickDraw, there is no one-to-one correlation between QuickDraw and Quartz 2D functions. However, because Quartz offers many new features and improved performance compared to QuickDraw, it is worthwhile making the effort to convert your graphics code to Quartz.

Availability
Declared In
PictUtils.h

InvokeCalcColorTableUPP

Invokes a color table calculation callback, using a universal procedure pointer. (Deprecated in Mac OS X v10.4. Use Quartz 2D instead; see Quartz Programming Guide for QuickDraw Developers.)

OSErr InvokeCalcColorTableUPP (
   UInt32 dataRef,
   SInt16 colorsRequested,
   void *colorBankPtr,
   CSpecArray resultPtr,
   CalcColorTableUPP userUPP
);

Discussion

For parameter descriptions, see CalcColorTableProcPtr.

Special Considerations

Because Quartz 2D uses an entirely different approach to graphics than used by QuickDraw, there is no one-to-one correlation between QuickDraw and Quartz 2D functions. However, because Quartz offers many new features and improved performance compared to QuickDraw, it is worthwhile making the effort to convert your graphics code to Quartz.

Availability
Declared In
PictUtils.h

InvokeDisposeColorPickMethodUPP

Invokes a method disposal callback, using a universal procedure pointer. (Deprecated in Mac OS X v10.4. Use Quartz 2D instead; see Quartz Programming Guide for QuickDraw Developers.)

OSErr InvokeDisposeColorPickMethodUPP (
   UInt32 dataRef,
   DisposeColorPickMethodUPP userUPP
);

Discussion

For more information, see DisposeColorPickMethodProcPtr.

Special Considerations

Because Quartz 2D uses an entirely different approach to graphics than used by QuickDraw, there is no one-to-one correlation between QuickDraw and Quartz 2D functions. However, because Quartz offers many new features and improved performance compared to QuickDraw, it is worthwhile making the effort to convert your graphics code to Quartz.

Availability
Declared In
PictUtils.h

InvokeInitPickMethodUPP

Invokes a method initialization callback, using a universal procedure pointer. (Deprecated in Mac OS X v10.4. Use Quartz 2D instead; see Quartz Programming Guide for QuickDraw Developers.)

OSErr InvokeInitPickMethodUPP (
   SInt16 colorsRequested,
   UInt32 *dataRef,
   SInt16 *colorBankType,
   InitPickMethodUPP userUPP
);

Discussion

For parameter descriptions, see InitPickMethodProcPtr.

Special Considerations

Because Quartz 2D uses an entirely different approach to graphics than used by QuickDraw, there is no one-to-one correlation between QuickDraw and Quartz 2D functions. However, because Quartz offers many new features and improved performance compared to QuickDraw, it is worthwhile making the effort to convert your graphics code to Quartz.

Availability
Declared In
PictUtils.h

InvokeRecordColorsUPP

Invokes a color recording callback, using a universal procedure pointer. (Deprecated in Mac OS X v10.4. Use Quartz 2D instead; see Quartz Programming Guide for QuickDraw Developers.)

OSErr InvokeRecordColorsUPP (
   UInt32 dataRef,
   RGBColor *colorsArray,
   SInt32 colorCount,
   SInt32 *uniqueColors,
   RecordColorsUPP userUPP
);

Discussion

For parameter descriptions, see RecordColorsProcPtr.

Special Considerations

Because Quartz 2D uses an entirely different approach to graphics than used by QuickDraw, there is no one-to-one correlation between QuickDraw and Quartz 2D functions. However, because Quartz offers many new features and improved performance compared to QuickDraw, it is worthwhile making the effort to convert your graphics code to Quartz.

Availability
Declared In
PictUtils.h

NewCalcColorTableUPP

Creates a new universal procedure pointer (UPP) to a color table calculation callback. (Deprecated in Mac OS X v10.4. Use Quartz 2D instead; see Quartz Programming Guide for QuickDraw Developers.)

CalcColorTableUPP NewCalcColorTableUPP (
   CalcColorTableProcPtr userRoutine
);

Parameters
userRoutine

A pointer to your color table calculation callback. For more information, see CalcColorTableProcPtr.

Return Value

A UPP to the callback.

Special Considerations

Because Quartz 2D uses an entirely different approach to graphics than used by QuickDraw, there is no one-to-one correlation between QuickDraw and Quartz 2D functions. However, because Quartz offers many new features and improved performance compared to QuickDraw, it is worthwhile making the effort to convert your graphics code to Quartz.

Availability
Declared In
PictUtils.h

NewDisposeColorPickMethodUPP

Creates a new universal procedure pointer (UPP) to a method disposal callback. (Deprecated in Mac OS X v10.4. Use Quartz 2D instead; see Quartz Programming Guide for QuickDraw Developers.)

DisposeColorPickMethodUPP NewDisposeColorPickMethodUPP (
   DisposeColorPickMethodProcPtr userRoutine
);

Parameters
userRoutine

A pointer to your method disposal callback. For more information, see DisposeColorPickMethodProcPtr.

Return Value

A UPP to the callback.

Special Considerations

Because Quartz 2D uses an entirely different approach to graphics than used by QuickDraw, there is no one-to-one correlation between QuickDraw and Quartz 2D functions. However, because Quartz offers many new features and improved performance compared to QuickDraw, it is worthwhile making the effort to convert your graphics code to Quartz.

Availability
Declared In
PictUtils.h

NewInitPickMethodUPP

Creates a new universal procedure pointer (UPP) to a method initialization callback. (Deprecated in Mac OS X v10.4. Use Quartz 2D instead; see Quartz Programming Guide for QuickDraw Developers.)

InitPickMethodUPP NewInitPickMethodUPP (
   InitPickMethodProcPtr userRoutine
);

Parameters
userRoutine

A pointer to your method initialization callback. For more information, see InitPickMethodProcPtr.

Return Value

A UPP to the callback.

Special Considerations

Because Quartz 2D uses an entirely different approach to graphics than used by QuickDraw, there is no one-to-one correlation between QuickDraw and Quartz 2D functions. However, because Quartz offers many new features and improved performance compared to QuickDraw, it is worthwhile making the effort to convert your graphics code to Quartz.

Availability
Declared In
PictUtils.h

NewPictInfo

Begins collecting pictures, pixel maps, and bitmaps for a survey of pictures. (Deprecated in Mac OS X v10.4. Use Quartz 2D instead; see Quartz Programming Guide for QuickDraw Developers.)

OSErr NewPictInfo (
   PictInfoID *thePictInfoID,
   short verb,
   short colorsRequested,
   short colorPickMethod,
   short version
);

Parameters
thePictInfoID

On return, a value that uniquely identifies your collection of pictures, pixel maps, or bitmaps.

verb

A value indicating what type of information you want the RetrievePictInfo function to return in a PictInfo structure. See “Color Information Type” for a description of the values you can use here.

The constants recordComments and recordFontInfo and the values they represent have no effect when gathering information about the pixel maps and bitmaps included in your survey.

Because the Palette Manager adds black and white when creating a palette, you can specify the number of colors you want minus 2 in the colorsRequested parameter and specify the constant suppressBlackAndWhite in the verb parameter when gathering colors destined for a Palette structure or a screen.

colorsRequested

From 1 to 256, the number of colors you want included in the ColorTable or Palette structure returned by the RetrievePictInfo function via a PictInfo structure.

colorPickMethod

The method by which colors are selected for the ColorTable or Palette structure included in the PictInfo structure returned by the RetrievePictInfo function. See “Color Selection Method” for a description of the values you can use here.

You can also create your own color-picking method in a resource file of type 'cpmt' and pass its resource ID in the colorPickMethod parameter. The resource ID must be greater than 127.

version

Always set this parameter to 0.

Return Value

A result code. See “Picture Utilities Result Codes.”

Discussion

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 the RecordPixMapInfo function. For each of these functions, identify the survey with the ID number returned by NewPictInfo.

Use the RetrievePictInfo function to return information about the pictures, pixel maps, and bitmaps in the survey. The RetrievePictInfo function returns your requested information in a PictInfo structure.

Use the verb parameter for NewPictInfo to specify whether you want to gather comment or font information for the pictures in the survey. If you want to gather color information, use the verb parameter for NewPictInfo to specify whether you want this information in a ColorTable structure, a Palette structure, or both. The PictInfo structure returned by the RetrievePictInfo function will then include a handle to a ColorTable structure or a Palette structure, or handles to both. If you want color information, be sure to use the colorPickMethod parameter to specify the method by which to select colors.

The Picture Utilities provide two color-picking methods: one (specified by the popularMethod constant) that gives you the most frequently used colors and one (specified by the medianMethod constant) that gives you the widest range of colors. If you specify the systemMethod constant, the Picture Utilities choose the method; currently they always choose popularMethod. You can also supply a color-picking method of your own.

Special Considerations

Because Quartz 2D uses an entirely different approach to graphics than used by QuickDraw, there is no one-to-one correlation between QuickDraw and Quartz 2D functions. However, because Quartz offers many new features and improved performance compared to QuickDraw, it is worthwhile making the effort to convert your graphics code to Quartz.

Availability
Declared In
PictUtils.h

NewRecordColorsUPP

Creates a new universal procedure pointer (UPP) to a color recording callback. (Deprecated in Mac OS X v10.4. Use Quartz 2D instead; see Quartz Programming Guide for QuickDraw Developers.)

RecordColorsUPP NewRecordColorsUPP (
   RecordColorsProcPtr userRoutine
);

Parameters
userRoutine

A pointer to your color recording callback. For more information, see RecordColorsProcPtr.

Return Value

A UPP to the callback.

Special Considerations

Because Quartz 2D uses an entirely different approach to graphics than used by QuickDraw, there is no one-to-one correlation between QuickDraw and Quartz 2D functions. However, because Quartz offers many new features and improved performance compared to QuickDraw, it is worthwhile making the effort to convert your graphics code to Quartz.

Availability
Declared In
PictUtils.h

RecordPictInfo

Adds a picture to an informational survey of multiple pictures. (Deprecated in Mac OS X v10.4. Use Quartz 2D instead; see Quartz Programming Guide for QuickDraw Developers.)

OSErr RecordPictInfo (
   PictInfoID thePictInfoID,
   PicHandle thePictHandle
);

Parameters
thePictInfoID

The ID number—returned by the NewPictInfo function—that identifies the survey to which you are adding the picture.

thePictHandle

A handle to the picture being added to the survey.

Return Value

A result code. See “Picture Utilities Result Codes.”

Discussion

The RecordPictInfo function adds the picture you specify in the parameter thePictHandle to the survey of pictures identified by the parameter thePictInfoID. Use RecordPictInfo repeatedly to add additional pictures to your survey.

After you have collected all of the pictures you need, use the RetrievePictInfo function to return information about pictures in the survey.

Special Considerations

Because Quartz 2D uses an entirely different approach to graphics than used by QuickDraw, there is no one-to-one correlation between QuickDraw and Quartz 2D functions. However, because Quartz offers many new features and improved performance compared to QuickDraw, it is worthwhile making the effort to convert your graphics code to Quartz.

When you ask for color information, RecordPictInfo takes into account only the version 2 and extended version picture opcodes RGBFgCol, RGBBkCol, BkPixPat, PnPixPat, FillPixPat, and HiliteColor. Each occurrence of these opcodes is treated as 1 pixel, regardless of the number and sizes of the objects drawn with that color. If you need an accurate set of colors from a complex picture, create an image of the picture in an offscreen pixel map, and then call the GetPixMapInfo function to obtain color information about that pixel map.

Availability
Declared In
PictUtils.h

RecordPixMapInfo

Adds a pixel map or bitmap to an informational survey of multiple pixel maps and bitmaps. (Deprecated in Mac OS X v10.4. Use Quartz 2D instead; see Quartz Programming Guide for QuickDraw Developers.)

OSErr RecordPixMapInfo (
   PictInfoID thePictInfoID,
   PixMapHandle thePixMapHandle
);

Parameters
thePictInfoID

The ID number—returned by the NewPictInfo function—that identifies the survey to which you are adding the pixel map or bitmap.

thePixMapHandle

A handle to a pixel map or bitmap to be added to the survey.

Return Value

A result code. See “Picture Utilities Result Codes.”

Discussion

The RecordPixMapInfo function adds the pixel map or bitmap you specify in the parameter thePixMapHandle to the survey identified by the parameter thePictInfoID. Use RecordPictInfo repeatedly to add additional pixel maps and bitmaps to your survey.

After you have collected all of the images you need, use the RetrievePictInfo function to return information about all the images in the survey.

Special Considerations

Because Quartz 2D uses an entirely different approach to graphics than used by QuickDraw, there is no one-to-one correlation between QuickDraw and Quartz 2D functions. However, because Quartz offers many new features and improved performance compared to QuickDraw, it is worthwhile making the effort to convert your graphics code to Quartz.

Availability
Declared In
PictUtils.h

RetrievePictInfo

Returns information about all the pictures, pixel maps, and bitmaps included in a survey. (Deprecated in Mac OS X v10.4. Use Quartz 2D instead; see Quartz Programming Guide for QuickDraw Developers.)

OSErr RetrievePictInfo (
   PictInfoID thePictInfoID,
   PictInfo *thePictInfo,
   short colorsRequested
);

Parameters
thePictInfoID

The ID number, returned by the NewPictInfo function, that identifies the survey of pictures, pixel maps, and bitmaps.

thePictInfo

On return, a pointer to the PictInfo structure that holds information about the pictures or images in the survey.

This function also collects information from black-and-white pictures and bitmaps, and is supported in System 7 even by computers running only basic QuickDraw. However, when collecting color information on a computer running only basic QuickDraw, the function returns NULL instead of a handle to a Palette or ColorTable structure.

colorsRequested

From 1 to 256, the number of colors you want returned in the ColorTable or Palette structure included in the PictInfo structure.

Return Value

A result code. See “Picture Utilities Result Codes.”

Discussion

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, call RetrievePictInfo.

When you are finished with the information in the PictInfo structure, dispose of the Palette structure by using the DisposePalette function. Dispose of the ColorTable structure with the DisposeCTable function. Dispose of other allocations with the DisposeHandle function. Use the DisposePictInfo function to dispose of the private data structures created by the NewPictInfo function.

Special Considerations

Because Quartz 2D uses an entirely different approach to graphics than used by QuickDraw, there is no one-to-one correlation between QuickDraw and Quartz 2D functions. However, because Quartz offers many new features and improved performance compared to QuickDraw, it is worthwhile making the effort to convert your graphics code to Quartz.

Availability
Declared In
PictUtils.h

< Previous PageNext Page > Hide TOC


© 2006 Apple Computer, Inc. All Rights Reserved. (Last updated: 2006-07-13)


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.