diff options
| author | Michele Calgaro <michele.calgaro@yahoo.it> | 2020-09-11 14:38:47 +0900 |
|---|---|---|
| committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2020-09-11 14:38:47 +0900 |
| commit | 884c8093d63402a1ad0b502244b791e3c6782be3 (patch) | |
| tree | a600d4ab0d431a2bdfe4c15b70df43c14fbd8dd0 /debian/lcms/lcms-1.19.dfsg2/python/testbed/virtprf.py | |
| parent | 14e1aa2006796f147f3f4811fb908a6b01e79253 (diff) | |
| download | extra-dependencies-884c8093d63402a1ad0b502244b791e3c6782be3.tar.gz extra-dependencies-884c8093d63402a1ad0b502244b791e3c6782be3.zip | |
Added debian extra dependency packages.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'debian/lcms/lcms-1.19.dfsg2/python/testbed/virtprf.py')
| -rwxr-xr-x | debian/lcms/lcms-1.19.dfsg2/python/testbed/virtprf.py | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/debian/lcms/lcms-1.19.dfsg2/python/testbed/virtprf.py b/debian/lcms/lcms-1.19.dfsg2/python/testbed/virtprf.py new file mode 100755 index 00000000..c364bfba --- /dev/null +++ b/debian/lcms/lcms-1.19.dfsg2/python/testbed/virtprf.py @@ -0,0 +1,46 @@ +# +# Sample: Creates a virtual profile emulating sRGB +# + +from lcms import * + +#hsRGB = cmsOpenProfileFromFile("sRGB Color Space profile.icm", "r") + +Rec709Primaries = cmsCIExyYTRIPLE(cmsCIExyY(0.6400, 0.3300, 1.0), + cmsCIExyY(0.3000, 0.6000, 1.0), + cmsCIExyY(0.1500, 0.0600, 1.0)) + + +Gamma22 = GAMMATABLE(2.2, 4096) + +print Gamma22 + +D65 = cmsCIExyY() +cmsWhitePointFromTemp(6504, D65) + +hVirtual_sRGB = cmsCreateRGBProfile(D65, + Rec709Primaries, + (Gamma22, Gamma22, Gamma22)); + + +hsRGB = cmsCreate_sRGBProfile(); + +xform = cmsCreateTransform(hsRGB, TYPE_RGB_8, hVirtual_sRGB, TYPE_RGB_8, + INTENT_PERCEPTUAL, cmsFLAGS_NOTPRECALC) + +color = COLORB() +color[0] = 155 +color[1] = 45 +color[2] = 200 + + +print color[0], color[1], color[2] + +cmsDoTransform(xform, color, color, 1) + +print color[0], color[1], color[2] + +cmsDeleteTransform(xform) +cmsCloseProfile(hsRGB) +cmsCloseProfile(hVirtual_sRGB) + |
