Werner Lemberg pushed to branch master at FreeType / FreeType
Commits:
-
3d77756e
by Tapish Ojha at 2022-01-27T08:43:19+01:00
1 changed file:
Changes:
... | ... | @@ -480,7 +480,7 @@ |
480 | 480 |
* A gamma of 2.2 is fair to assume. And then, we need to
|
481 | 481 |
* undo the premultiplication too.
|
482 | 482 |
*
|
483 |
- * https://accessibility.kde.org/hsl-adjusted.php
|
|
483 |
+ * http://www.brucelindbloom.com/index.html?WorkingSpaceInfo.html#SideNotes
|
|
484 | 484 |
*
|
485 | 485 |
* We do the computation with integers only, applying a gamma of 2.0.
|
486 | 486 |
* We guarantee 32-bit arithmetic to avoid overflow but the resulting
|
... | ... | @@ -488,9 +488,9 @@ |
488 | 488 |
*
|
489 | 489 |
*/
|
490 | 490 |
|
491 |
- l = ( 4732UL /* 0.0722 * 65536 */ * bgra[0] * bgra[0] +
|
|
492 |
- 46871UL /* 0.7152 * 65536 */ * bgra[1] * bgra[1] +
|
|
493 |
- 13933UL /* 0.2126 * 65536 */ * bgra[2] * bgra[2] ) >> 16;
|
|
491 |
+ l = ( 4731UL /* 0.072186 * 65536 */ * bgra[0] * bgra[0] +
|
|
492 |
+ 46868UL /* 0.715158 * 65536 */ * bgra[1] * bgra[1] +
|
|
493 |
+ 13937UL /* 0.212656 * 65536 */ * bgra[2] * bgra[2] ) >> 16;
|
|
494 | 494 |
|
495 | 495 |
/*
|
496 | 496 |
* Final transparency can be determined as follows.
|