pythonware.com ::: library ::: Python Imaging Library Handbook (2003 Edition) |
To use the ImagePalette class and related functions, import the ImagePalette module.
import ImagePalette im.putpalette(ImagePalette.ImagePalette("RGB"))
ImagePalette.ImagePalette(mode="RGB") => palette instance
This constructor creates a new palette, mapping from "P" to the given mode. The palette is initialised to a linear grayscale ramp.