The Python Imaging Library |
![]() |
|
Copyright © 1997 by Fredrik Lundh <fredrik@pythonware.com> | ||
Updated 17 Aug 1997 |
To use the ImagePalette class and related functions,
import the ImagePalette module.
import ImagePalette im.palette = ImagePalette.ImagePalette("RGB")
ImagePalette( mode = "RGB" ). This constructor create a new palette, mapping from "P" to the given mode. The palette is initialised to a linear ramp.