Draft (Updated 1999-02-12)
[FIXME: this section doesn't match the current implementation. for now, the safest way to attach a palette to an image is to use the putpalette method]
To use the ImagePalette class and related functions, import the ImagePalette module.
Example: Attach a Palette to an Image
import ImagePalette im.palette = ImagePalette.ImagePalette("RGB")
ImagePalette(mode="RGB"). This constructor creates a new palette, mapping from "P" to the given mode. The palette is initialised to a linear ramp.