Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > 77af565a2ba23d0b45e534953dd784bd > files > 9

python-lcms-1.19-10.mga4.x86_64.rpm


#
# Sample: Gamut clamping
#

from lcms import *



Lab = cmsCIELab(80, -200, 50)
print "Original", Lab

#
# Desaturates color to bring it into gamut.
# The gamut boundaries are specified as:
#   -120 <= a <= 120
#   -130 <= b <= 130

cmsClampLab(Lab, 120, -120, 130, -130)

print "Constrained", Lab