Add more tests for ImageCms

This commit is contained in:
hugovk 2014-06-02 13:19:01 +03:00
parent 9e984a19b1
commit 6115d348b9

View File

@ -33,6 +33,11 @@ def test_sanity():
i = ImageCms.applyTransform(lena(), t)
assert_image(i, "RGB", (128, 128))
i = lena()
t = ImageCms.buildTransform(SRGB, SRGB, "RGB", "RGB")
ImageCms.applyTransform(lena(), t, inPlace=True)
assert_image(i, "RGB", (128, 128))
p = ImageCms.createProfile("sRGB")
o = ImageCms.getOpenProfile(SRGB)
t = ImageCms.buildTransformFromOpenProfiles(p, o, "RGB", "RGB")
@ -71,6 +76,11 @@ def test_manufacturer():
'IEC http://www.iec.ch')
def test_model():
assert_equal(ImageCms.getProfileModel(SRGB).strip(),
'IEC 61966-2.1 Default RGB colour space - sRGB')
def test_description():
assert_equal(ImageCms.getProfileDescription(SRGB).strip(),
'sRGB IEC61966-2.1')