mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-07-05 20:33:24 +03:00
extend documentation for PNG transparency
This commit is contained in:
parent
c773688f37
commit
eb0f400e02
|
@ -370,8 +370,13 @@ The :py:meth:`~PIL.Image.Image.open` method sets the following
|
||||||
Gamma, given as a floating point number.
|
Gamma, given as a floating point number.
|
||||||
|
|
||||||
**transparency**
|
**transparency**
|
||||||
Transparency color index. This key is omitted if the image is not a
|
For ``P`` images: Either the palette index for full transparent pixels,
|
||||||
transparent palette image.
|
or a byte string with alpha values for each palette entry.
|
||||||
|
|
||||||
|
For ``L`` and ``RGB`` images, the color that represents full transparent
|
||||||
|
pixels in this image.
|
||||||
|
|
||||||
|
This key is omitted if the image is not a transparent palette image.
|
||||||
|
|
||||||
``Open`` also sets ``Image.text`` to a list of the values of the
|
``Open`` also sets ``Image.text`` to a list of the values of the
|
||||||
``tEXt``, ``zTXt``, and ``iTXt`` chunks of the PNG image. Individual
|
``tEXt``, ``zTXt``, and ``iTXt`` chunks of the PNG image. Individual
|
||||||
|
@ -392,6 +397,9 @@ The :py:meth:`~PIL.Image.Image.save` method supports the following options:
|
||||||
For ``P``, ``L``, and ``RGB`` images, this option controls what
|
For ``P``, ``L``, and ``RGB`` images, this option controls what
|
||||||
color image to mark as transparent.
|
color image to mark as transparent.
|
||||||
|
|
||||||
|
For ``P`` images, this can be a either the palette index,
|
||||||
|
or a byte string with alpha values for each palette entry.
|
||||||
|
|
||||||
**dpi**
|
**dpi**
|
||||||
A tuple of two numbers corresponding to the desired dpi in each direction.
|
A tuple of two numbers corresponding to the desired dpi in each direction.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user