mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-02-04 05:34:36 +03:00
Merge pull request #6831 from radarhere/transparency_documentation
Document "transparency" info key
This commit is contained in:
commit
be949e87a4
|
@ -111,6 +111,18 @@ the file format handler (see the chapter on :ref:`image-file-formats`). Most
|
|||
handlers add properties to the :py:attr:`~PIL.Image.Image.info` attribute when
|
||||
loading an image, but ignore it when saving images.
|
||||
|
||||
Transparency
|
||||
------------
|
||||
|
||||
If an image does not have an alpha band, transparency may be specified in the
|
||||
:py:attr:`~PIL.Image.Image.info` attribute with a "transparency" key.
|
||||
|
||||
Most of the time, the "transparency" value is a single integer, describing
|
||||
which pixel value is transparent in a "1", "L", "I" or "P" mode image.
|
||||
However, PNG images may have three values, one for each channel in an "RGB"
|
||||
mode image, or can have a byte string for a "P" mode image, to specify the
|
||||
alpha value for each palette entry.
|
||||
|
||||
Orientation
|
||||
-----------
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user