mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-27 09:44:31 +03:00
Improved documentation
This commit is contained in:
parent
894ff64cf1
commit
1f40684743
|
@ -35,7 +35,12 @@ operations in this module).
|
||||||
.. autofunction:: PIL.ImageChops.logical_and
|
.. autofunction:: PIL.ImageChops.logical_and
|
||||||
.. autofunction:: PIL.ImageChops.logical_or
|
.. autofunction:: PIL.ImageChops.logical_or
|
||||||
.. autofunction:: PIL.ImageChops.multiply
|
.. autofunction:: PIL.ImageChops.multiply
|
||||||
.. autofunction:: PIL.ImageChops.offset
|
.. py:method:: PIL.ImageChops.offset(image, xoffset, yoffset=None)
|
||||||
|
|
||||||
|
Returns a copy of the image where data has been offset by the given
|
||||||
|
distances. Data wraps around the edges. If **yoffset** is omitted, it
|
||||||
|
is assumed to be equal to **xoffset**.
|
||||||
|
|
||||||
.. autofunction:: PIL.ImageChops.screen
|
.. autofunction:: PIL.ImageChops.screen
|
||||||
.. autofunction:: PIL.ImageChops.subtract
|
.. autofunction:: PIL.ImageChops.subtract
|
||||||
.. autofunction:: PIL.ImageChops.subtract_modulo
|
.. autofunction:: PIL.ImageChops.subtract_modulo
|
||||||
|
|
|
@ -39,5 +39,17 @@ The ImageColor module supports the following string formats:
|
||||||
Functions
|
Functions
|
||||||
---------
|
---------
|
||||||
|
|
||||||
.. autofunction:: getrgb
|
.. py:method:: getrgb(color)
|
||||||
.. autofunction:: getcolor
|
|
||||||
|
Convert a color string to an RGB tuple. If the string cannot be parsed,
|
||||||
|
this function raises a :py:exc:`ValueError` exception.
|
||||||
|
|
||||||
|
.. versionadded:: 1.1.4
|
||||||
|
|
||||||
|
.. py:method:: getcolor(color, mode)
|
||||||
|
|
||||||
|
Same as :py:func:`~PIL.ImageColor.getrgb`, but converts the RGB value to a
|
||||||
|
greyscale value if the mode is not color or a palette image. If the string
|
||||||
|
cannot be parsed, this function raises a :py:exc:`ValueError` exception.
|
||||||
|
|
||||||
|
.. versionadded:: 1.1.4
|
||||||
|
|
|
@ -29,10 +29,46 @@ Classes
|
||||||
All enhancement classes implement a common interface, containing a single
|
All enhancement classes implement a common interface, containing a single
|
||||||
method:
|
method:
|
||||||
|
|
||||||
.. autoclass:: PIL.ImageEnhance._Enhance
|
.. py:class:: PIL.ImageEnhance._Enhance
|
||||||
:members:
|
.. py:method:: enhance(factor)
|
||||||
|
|
||||||
.. autoclass:: PIL.ImageEnhance.Color
|
Returns an enhanced image.
|
||||||
.. autoclass:: PIL.ImageEnhance.Contrast
|
|
||||||
.. autoclass:: PIL.ImageEnhance.Brightness
|
:param factor: A floating point value controlling the enhancement.
|
||||||
.. autoclass:: PIL.ImageEnhance.Sharpness
|
Factor 1.0 always returns a copy of the original image,
|
||||||
|
lower factors mean less color (brightness, contrast,
|
||||||
|
etc), and higher values more. There are no restrictions
|
||||||
|
on this value.
|
||||||
|
|
||||||
|
.. py:class:: PIL.ImageEnhance.Color(image)
|
||||||
|
|
||||||
|
Adjust image color balance.
|
||||||
|
|
||||||
|
This class can be used to adjust the colour balance of an image, in
|
||||||
|
a manner similar to the controls on a colour TV set. An enhancement
|
||||||
|
factor of 0.0 gives a black and white image. A factor of 1.0 gives
|
||||||
|
the original image.
|
||||||
|
|
||||||
|
.. py:class:: PIL.ImageEnhance.Contrast(image)
|
||||||
|
|
||||||
|
Adjust image contrast.
|
||||||
|
|
||||||
|
This class can be used to control the contrast of an image, similar
|
||||||
|
to the contrast control on a TV set. An enhancement factor of 0.0
|
||||||
|
gives a solid grey image. A factor of 1.0 gives the original image.
|
||||||
|
|
||||||
|
.. py:class:: PIL.ImageEnhance.Brightness(image)
|
||||||
|
|
||||||
|
Adjust image brightness.
|
||||||
|
|
||||||
|
This class can be used to control the brightness of an image. An
|
||||||
|
enhancement factor of 0.0 gives a black image. A factor of 1.0 gives the
|
||||||
|
original image.
|
||||||
|
|
||||||
|
.. py:class:: PIL.ImageEnhance.Sharpness(image)
|
||||||
|
|
||||||
|
Adjust image sharpness.
|
||||||
|
|
||||||
|
This class can be used to adjust the sharpness of an image. An
|
||||||
|
enhancement factor of 0.0 gives a blurred image, a factor of 1.0 gives the
|
||||||
|
original image, and a factor of 2.0 gives a sharpened image.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user