Skip to content

Commit

Permalink
Cast alpha values to int before bit shifting to fix an implicit cast …
Browse files Browse the repository at this point in the history
…error
  • Loading branch information
dmester committed Jul 2, 2022
1 parent 6a67ba4 commit 994ee07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Canvas/ColorUtils.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ public static function over($fore, $back)
($forePA * (($fore >> 24) & 0xff) + $backPA * (($back >> 24) & 0xff)) /
$pa);

$a = ($pa / 255);
$a = (int) ($pa / 255);

return ($r << 24) | ($g << 16) | ($b << 8) | $a;
}
Expand Down

0 comments on commit 994ee07

Please sign in to comment.