/usr/share/doc/python-imaging/html/concepts.htm is in python-imaging-doc-html 1.1.2-1.1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | <html><head><title>Concepts</title><link rel="stylesheet" type="text/css" href="effbot.css" /></head><body><div id="CONCEPTS-CHAPTER" class="chapter"><h1 style="chapter">Concepts</h1><p>The Python Imaging Library handles <i>raster images</i>,
that is, rectangles of pixel data.</p><div class="sect1"><h2 style="sect1">Bands</h2><p>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.</p><p>To get the number and names of bands in an image, use the <a href="image.htm#image-getbands-method"><tt>getbands</tt></a>
method.</p></div><div class="sect1"><h2 style="sect1">Mode</h2><p>The mode of an image defines the type and depth of a pixel in the
image. The current release supports the following standard modes:</p><ul><li><p>1 (1-bit pixels, black and white, stored as 8-bit pixels)</p></li><li><p>L (8-bit pixels, black and white)</p></li><li><p>P (8-bit pixels, mapped to any other mode using a colour palette)</p></li><li><p>RGB (3x8-bit pixels, true colour)</p></li><li><p>RGBA (4x8-bit pixels, true colour with transparency mask)</p></li><li><p>CMYK (4x8-bit pixels, colour separation)</p></li><li><p>YCbCr (3x8-bit pixels, colour video format)</p></li><li><p>I (32-bit integer pixels)</p></li><li><p>F (32-bit floating point pixels)</p></li></ul><p>PIL also supports a few special modes, including RGBX (true colour
with padding) and RGBa (true colour with premultiplied alpha).</p><p>You can read the mode of an image through the <a href="image.htm#image-mode-attribute"><tt>mode</tt></a>
attribute. This is a string containing one of the above values.</p></div><div class="sect1"><h2 style="sect1">Size</h2><p>You can read the image size through the <a href="image.htm#image-size-attribute"><tt>size</tt></a>
attribute. This is a 2-tuple, containing the horizontal and vertical
size in pixels.</p></div><div class="sect1"><h2 style="sect1">Coordinate System</h2><p>The Python Imaging Library uses a Cartesian pixel coordinate system,
with (0,0) in the upper left corner. Note that the coordinates refer
to the implied pixel corners; the centre of a pixel addressed as (0,
0) actually lies at (0.5, 0.5):</p><img src="concept1.gif" /><p>Coordinates are usually passed to the library as 2-tuples (x,
y). Rectangles are represented as 4-tuples, with the upper left corner
given first. For example, a rectangle covering all of an 800x600 pixel
image is written as (0, 0, 800, 600).</p></div><div class="sect1"><h2 style="sect1">Palette</h2><p>The palette mode ("P") uses a colour palette to define the actual
colour for each pixel.</p></div><div class="sect1"><h2 style="sect1">Info</h2><p>You can attach auxiliary information to an image using the <a href="image.htm#image-info-attribute"><tt>info</tt></a>
attribute. This is a dictionary object.</p><p>How such information is handled when loading and saving image files is
up to the file format handler (see the chapter on <a href="image-file-formats.htm#image-file-formats-chapter"><i>Image File
Formats</i></a>).</p></div></div></body></html>
|