mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-14 03:21:44 +03:00
Merge pull request #6188 from radarhere/point
This commit is contained in:
commit
63f64de8b5
|
@ -10,6 +10,7 @@ def test_sanity():
|
||||||
im.point(list(range(256)))
|
im.point(list(range(256)))
|
||||||
im.point(list(range(256)) * 3)
|
im.point(list(range(256)) * 3)
|
||||||
im.point(lambda x: x)
|
im.point(lambda x: x)
|
||||||
|
im.point(lambda x: x * 1.2)
|
||||||
|
|
||||||
im = im.convert("I")
|
im = im.convert("I")
|
||||||
with pytest.raises(ValueError):
|
with pytest.raises(ValueError):
|
||||||
|
|
|
@ -1720,6 +1720,8 @@ class Image:
|
||||||
# FIXME: _imaging returns a confusing error message for this case
|
# FIXME: _imaging returns a confusing error message for this case
|
||||||
raise ValueError("point operation not supported for this mode")
|
raise ValueError("point operation not supported for this mode")
|
||||||
|
|
||||||
|
if mode != "F":
|
||||||
|
lut = [round(i) for i in lut]
|
||||||
return self._new(self.im.point(lut, mode))
|
return self._new(self.im.point(lut, mode))
|
||||||
|
|
||||||
def putalpha(self, alpha):
|
def putalpha(self, alpha):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user