summaryrefslogtreecommitdiff
path: root/test/src/lcms-tests.el
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright year to 2018Paul Eggert2018-01-011-1/+1
| | | | Run admin/update-copyright.
* Add CAM02 JCh and CAM02-UCS J'a'b' conversionsMark Oteiza2017-09-301-0/+44
| | | | | | | | | | | | * src/lcms.c (rad2deg, parse_jch_list, parse_jab_list, xyz_to_jch): (jch_to_xyz, jch_to_jab, jab_to_jch): New functions. (lcms-jch->xyz, lcms-jch->xyz, lcms-jch->jab, lcms-jab->jch): New Lisp functions. (lcms-cam02-ucs): Refactor. (syms_of_lcms2): Declare new functions. * test/src/lcms-tests.el (lcms-roundtrip, lcms-ciecam02-gold): (lcms-jmh->cam02-ucs-silver): New tests. * etc/NEWS: Mention new functions.
* Expose viewing conditions in CAM02-UCS metricMark Oteiza2017-09-211-5/+32
| | | | | | | | | | | | | | | | 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.
* * test/src/lcms-tests.el (lcms-cri-cam02-ucs): Skip if lcms2 not present.Glenn Morris2017-09-161-0/+1
|
* * test/src/lcms-tests.el (lcms-whitepoint): Skip if lcms2 not present.Glenn Morris2017-09-161-1/+2
| | | | (cherry picked from commit 8081df26911c63aadfce4ee8f6a7223d814baeaf)
* Add lisp variable lcms-d65-xyzMark Oteiza2017-09-161-0/+19
| | | | | | | | | | This serves as the default optional argument for functions in this library. * src/lcms.c (lcms-d65-xyz): New variable. (lcms-cam02-ucs): Use it. Use better word in docstring. Fix bug color1 -> color2. * test/src/lcms-tests.el: Add some tests for lcms-cri-cam02-ucs. (lcms-colorspacious-d65): New variable.
* Add lcms-temp->white-point and initial testsMark Oteiza2017-09-151-0/+69
* src/lcms.c (lcms-temp->white-point): New function. * test/src/lcms-tests.el: New file.