python图形处理库PIL(Python Image Library)的基本概念
4/25/2009 2:24:59 PM
Concepts
The Python Imaging Library handles raster images, that is, rectangles of pixel data.
Bands
An image can consist of one or more bands of data. The Python Imaging Library allows you
to store several bands in a single image, provided they all have the same dimensions and
depth.
To get the number and names of bands in an image, use the getbands method.
Mode
The mode of an image defines the type and depth of a pixel in the image. The current
release supports the following standard modes:
· 1 (1-bit pixels, black and white, stored as 8-bit pixels)
· L (8-bit pixels, black and white)
· P (8-bit pixels, mapped to any other mode using a colour palette)
The Python Imaging Library handles raster images, that is, rectangles of pixel data.
Bands
An image can consist of one or more bands of data. The Python Imaging Library allows you
to store several bands in a single image, provided they all have the same dimensions and
depth.
To get the number and names of bands in an image, use the getbands method.
Mode
The mode of an image defines the type and depth of a pixel in the image. The current
release supports the following standard modes:
· 1 (1-bit pixels, black and white, stored as 8-bit pixels)
· L (8-bit pixels, black and white)
· P (8-bit pixels, mapped to any other mode using a colour palette)