]> git.eshelyaron.com Git - emacs.git/commit
Expose viewing conditions in CAM02-UCS metric
authorMark Oteiza <mvoteiza@udel.edu>
Fri, 22 Sep 2017 02:47:24 +0000 (22:47 -0400)
committerMark Oteiza <mvoteiza@udel.edu>
Fri, 22 Sep 2017 03:06:00 +0000 (23:06 -0400)
commitd24ec5854098841388dfecf2c668e7f48f348af0
treef8abf85b73a971d981874daa9876aa0640403ab3
parenta81d5a3d3fcb76f6b074c2c721b80b1802135d41
Expose viewing conditions in CAM02-UCS metric

Also add tests from the colorspacious library.  Finally, catch an
errant calculation, where degrees were not being converted to radians.
* src/lcms.c (deg2rad, default_viewing_conditions):
(parse_viewing_conditions): New functions.
(lcms-cam02-ucs): Add comments pointing to references used.  Expand
the docstring and explain viewing conditions.  JCh hue is given in
degrees and needs to be converted to radians.
(lcms-d65-xyz): Remove.  No need to duplicate this in Lisp or make the
API needlessly impure.
* test/src/lcms-tests.el: Reword commentary.
(lcms-rgb255->xyz): New function.
(lcms-cri-cam02-ucs): Fix let-binding.
(lcms-dE-cam02-ucs-silver): New test, assimilated from colorspacious.
src/lcms.c
test/src/lcms-tests.el