mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-27 02:16:19 +03:00
Clarified that the sequence object for putdata() should be flattened
This commit is contained in:
parent
282d8250c6
commit
020308a7be
|
@ -1705,13 +1705,14 @@ class Image:
|
||||||
|
|
||||||
def putdata(self, data, scale=1.0, offset=0.0):
|
def putdata(self, data, scale=1.0, offset=0.0):
|
||||||
"""
|
"""
|
||||||
Copies pixel data to this image. This method copies data from a
|
Copies pixel data from a flattened sequence object into the image. The
|
||||||
sequence object into the image, starting at the upper left
|
values should start at the upper left corner (0, 0), continue to the
|
||||||
corner (0, 0), and continuing until either the image or the
|
end of the line, followed directly by the first value of the second
|
||||||
sequence ends. The scale and offset values are used to adjust
|
line, and so on. Data will be read until either the image or the
|
||||||
the sequence values: **pixel = value*scale + offset**.
|
sequence ends. The scale and offset values are used to adjust the
|
||||||
|
sequence values: **pixel = value*scale + offset**.
|
||||||
|
|
||||||
:param data: A sequence object.
|
:param data: A flattened sequence object.
|
||||||
:param scale: An optional scale value. The default is 1.0.
|
:param scale: An optional scale value. The default is 1.0.
|
||||||
:param offset: An optional offset value. The default is 0.0.
|
:param offset: An optional offset value. The default is 0.0.
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue
Block a user