mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-20 20:24:45 +03:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
9a78e37936
commit
db137d688d
|
@ -521,9 +521,9 @@ def invert(image):
|
||||||
:return: An image.
|
:return: An image.
|
||||||
"""
|
"""
|
||||||
# Special case for 1-bit images using python translate() method
|
# Special case for 1-bit images using python translate() method
|
||||||
if image.mode == '1':
|
if image.mode == "1":
|
||||||
lut = bytearray(range(255,-1,-1))
|
lut = bytearray(range(255, -1, -1))
|
||||||
return Image.frombuffer('1',image.size,image.tobytes().translate(lut))
|
return Image.frombuffer("1", image.size, image.tobytes().translate(lut))
|
||||||
|
|
||||||
lut = []
|
lut = []
|
||||||
for i in range(256):
|
for i in range(256):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user