mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-05-04 16:03:42 +03:00
Merge pull request #6034 from radarhere/imageops
This commit is contained in:
commit
4bc6483564
|
@ -63,6 +63,7 @@ def test_sanity():
|
||||||
ImageOps.grayscale(hopper("L"))
|
ImageOps.grayscale(hopper("L"))
|
||||||
ImageOps.grayscale(hopper("RGB"))
|
ImageOps.grayscale(hopper("RGB"))
|
||||||
|
|
||||||
|
ImageOps.invert(hopper("1"))
|
||||||
ImageOps.invert(hopper("L"))
|
ImageOps.invert(hopper("L"))
|
||||||
ImageOps.invert(hopper("RGB"))
|
ImageOps.invert(hopper("RGB"))
|
||||||
|
|
||||||
|
|
|
@ -525,7 +525,7 @@ def invert(image):
|
||||||
lut = []
|
lut = []
|
||||||
for i in range(256):
|
for i in range(256):
|
||||||
lut.append(255 - i)
|
lut.append(255 - i)
|
||||||
return _lut(image, lut)
|
return image.point(lut) if image.mode == "1" else _lut(image, lut)
|
||||||
|
|
||||||
|
|
||||||
def mirror(image):
|
def mirror(image):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user