mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-28 19:06:18 +03:00
Fix unexpected unindents
This commit is contained in:
parent
b3547dc2c0
commit
113477fbee
|
@ -2181,12 +2181,14 @@ class Image:
|
||||||
|
|
||||||
It may also be an :py:class:`~PIL.Image.ImageTransformHandler`
|
It may also be an :py:class:`~PIL.Image.ImageTransformHandler`
|
||||||
object::
|
object::
|
||||||
|
|
||||||
class Example(Image.ImageTransformHandler):
|
class Example(Image.ImageTransformHandler):
|
||||||
def transform(size, method, data, resample, fill=1):
|
def transform(size, method, data, resample, fill=1):
|
||||||
# Return result
|
# Return result
|
||||||
|
|
||||||
It may also be an object with a :py:meth:`~method.getdata` method
|
It may also be an object with a :py:meth:`~method.getdata` method
|
||||||
that returns a tuple supplying new **method** and **data** values::
|
that returns a tuple supplying new **method** and **data** values::
|
||||||
|
|
||||||
class Example(object):
|
class Example(object):
|
||||||
def getdata(self):
|
def getdata(self):
|
||||||
method = Image.EXTENT
|
method = Image.EXTENT
|
||||||
|
|
|
@ -234,6 +234,7 @@ def pad(image, size, method=Image.BICUBIC, color=None, centering=(0.5, 0.5)):
|
||||||
:param color: The background color of the padded image.
|
:param color: The background color of the padded image.
|
||||||
:param centering: Control the position of the original image within the
|
:param centering: Control the position of the original image within the
|
||||||
padded version.
|
padded version.
|
||||||
|
|
||||||
(0.5, 0.5) will keep the image centered
|
(0.5, 0.5) will keep the image centered
|
||||||
(0, 0) will keep the image aligned to the top left
|
(0, 0) will keep the image aligned to the top left
|
||||||
(1, 1) will keep the image aligned to the bottom
|
(1, 1) will keep the image aligned to the bottom
|
||||||
|
|
Loading…
Reference in New Issue
Block a user