NewImageGWorld
The NewImageGWorld function creates a graphics world from the width, height, depth, and color table of a specified image-description structure.
pascal QDErr NewImageGWorld (GWorldPtr *gworld,
ImageDescription **idh,
GWorldFlags flags);
gworld
- Contains a pointer to a graphic world created using the width, height, depth, and color table specified in the image description structure pointed to in the
idh parameter.
idh
- Contains a handle to an image description structure with information for the graphics world pointed to by the
gworld parameter.
flags
- Contains graphics world flags. These flags are passed directly through to the
NewGWorld function. (For details on NewGWorld, see Inside Macintosh: Devices.)
DESCRIPTION
The NewImageGWorld function selects the appropriate color table using the depth field or custom color table in the image description structure. It creates a 32-bit-deep graphics world if the depth specified in the image description structure is 24.
SPECIAL CONSIDERATIONS
You are responsible for disposing of the graphics world with the DisposeGWorld routine. (For more on DisposeGWorld, see Inside Macintosh: Devices.)
RESULT CODES
| noErr | 0 | No error |
| paramErr | -50 | Invalid parameter specified |
| cDepthErr | -157 | Invalid pixel resolution |