File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -167,9 +167,11 @@ function gam_a98rgb(RGB) {
167167}
168168
169169function lin_a98rgb_to_XYZ ( rgb ) {
170- // convert an array of linear-light ProPhotoRGB values to CIE XYZ
170+ // convert an array of linear-light a98rgb values to CIE XYZ
171171 // using D50 (so no chromatic adaptation needed afterwards)
172172 // http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html
173+ // which has greater numerical precsion than section 4.3.5.3 of
174+ // https://www.adobe.com/digitalimag/pdfs/AdobeRGB1998.pdf
173175 var M = Math . matrix ( [
174176 [ 0.5766690429101305 , 0.1855582379065463 , 0.1882286462349947 ] ,
175177 [ 0.29734497525053605 , 0.6273635662554661 , 0.07529145849399788 ] ,
@@ -180,7 +182,7 @@ function lin_a98rgb_to_XYZ(rgb) {
180182}
181183
182184function XYZ_to_lin_a98rgb ( XYZ ) {
183- // convert XYZ to linear-light ProPhotoRGB
185+ // convert XYZ to linear-light a98rgb
184186 var M = Math . matrix ( [
185187 [ 2.0415879038107465 , - 0.5650069742788596 , - 0.34473135077832956 ] ,
186188 [ - 0.9692436362808795 , 1.8759675015077202 , 0.04155505740717557 ] ,
You can’t perform that action at this time.
0 commit comments