发布于 2015-09-11 16:11:00 | 190 次阅读 | 评论: 0 | 来源: 网络整理
The ImagePalette module contains a class of the same name to represent the color palette of palette mapped images.
注解
This module was never well-documented. It hasn’t changed since 2001, though, so it’s probably safe for you to read the source code and puzzle out the internals if you need to.
The ImagePalette class has several methods, but they are all marked as “experimental.” Read that as you will. The [source] link is there for a reason.
Color palette for palette mapped images
Given an rgb tuple, allocate palette entry.
警告
This method is experimental.
Get palette contents in format suitable # for the low-level im.putpalette primitive.
警告
This method is experimental.
Convert palette to bytes.
警告
This method is experimental.