mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 17:36:18 +03:00
Merge pull request #6866 from radarhere/lcms2
This commit is contained in:
commit
14e0128873
|
@ -254,17 +254,6 @@ def test_p2pa_palette():
|
||||||
assert im_pa.getpalette() == im.getpalette()
|
assert im_pa.getpalette() == im.getpalette()
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize("mode", ("RGB", "RGBA", "RGBX"))
|
|
||||||
def test_rgb_lab(mode):
|
|
||||||
im = Image.new(mode, (1, 1))
|
|
||||||
converted_im = im.convert("LAB")
|
|
||||||
assert converted_im.getpixel((0, 0)) == (0, 128, 128)
|
|
||||||
|
|
||||||
im = Image.new("LAB", (1, 1), (255, 0, 0))
|
|
||||||
converted_im = im.convert(mode)
|
|
||||||
assert converted_im.getpixel((0, 0))[:3] == (0, 255, 255)
|
|
||||||
|
|
||||||
|
|
||||||
def test_matrix_illegal_conversion():
|
def test_matrix_illegal_conversion():
|
||||||
# Arrange
|
# Arrange
|
||||||
im = hopper("CMYK")
|
im = hopper("CMYK")
|
||||||
|
|
|
@ -625,3 +625,14 @@ def test_constants_deprecation():
|
||||||
for name in enum.__members__:
|
for name in enum.__members__:
|
||||||
with pytest.warns(DeprecationWarning):
|
with pytest.warns(DeprecationWarning):
|
||||||
assert getattr(ImageCms, prefix + name) == enum[name]
|
assert getattr(ImageCms, prefix + name) == enum[name]
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.parametrize("mode", ("RGB", "RGBA", "RGBX"))
|
||||||
|
def test_rgb_lab(mode):
|
||||||
|
im = Image.new(mode, (1, 1))
|
||||||
|
converted_im = im.convert("LAB")
|
||||||
|
assert converted_im.getpixel((0, 0)) == (0, 128, 128)
|
||||||
|
|
||||||
|
im = Image.new("LAB", (1, 1), (255, 0, 0))
|
||||||
|
converted_im = im.convert(mode)
|
||||||
|
assert converted_im.getpixel((0, 0))[:3] == (0, 255, 255)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user