more colour tests
This commit is contained in:
parent
e458365970
commit
fd8dbdb08c
|
@ -125,6 +125,17 @@ class TestColour(unittest.TestCase):
|
||||||
after = im.getpoint(10, 10)
|
after = im.getpoint(10, 10)
|
||||||
self.assertAlmostEqualObjects(before, after, places = 1)
|
self.assertAlmostEqualObjects(before, after, places = 1)
|
||||||
|
|
||||||
|
# go between every pair of colour spaces
|
||||||
|
for start in colour_colourspaces:
|
||||||
|
for end in colour_colourspaces:
|
||||||
|
im = test.colourspace(start)
|
||||||
|
im2 = im.colourspace(end)
|
||||||
|
im3 = im2.colourspace(Vips.Interpretation.LAB)
|
||||||
|
|
||||||
|
before = test.getpoint(10, 10)
|
||||||
|
after = im3.getpoint(10, 10)
|
||||||
|
self.assertAlmostEqualObjects(before, after, places = 1)
|
||||||
|
|
||||||
# test Lab->XYZ on mid-grey
|
# test Lab->XYZ on mid-grey
|
||||||
# checked against http://www.brucelindbloom.com
|
# checked against http://www.brucelindbloom.com
|
||||||
im = test.colourspace(Vips.Interpretation.XYZ)
|
im = test.colourspace(Vips.Interpretation.XYZ)
|
||||||
|
|
Loading…
Reference in New Issue