From 0c1f322476a090b945108e6df960ee381a8c352e Mon Sep 17 00:00:00 2001 From: codemasher Date: Mon, 13 Dec 2021 00:34:10 +0100 Subject: [PATCH] :shower: --- src/Decoder/Binarizer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Decoder/Binarizer.php b/src/Decoder/Binarizer.php index 85ba3b60f..2a6f6d085 100644 --- a/src/Decoder/Binarizer.php +++ b/src/Decoder/Binarizer.php @@ -339,7 +339,7 @@ final class Binarizer{ for($j = 0, $o = $yoffset * $width + $xoffset; $j < self::BLOCK_SIZE; $j++, $o += $width){ for($i = 0; $i < self::BLOCK_SIZE; $i++){ // Comparison needs to be <= so that black == 0 pixels are black even if the threshold is 0. - if(($luminances[$o + $i] & 0xff) <= $average){ + if(((int)($luminances[$o + $i]) & 0xff) <= $average){ $matrix->set($xoffset + $i, $yoffset + $j); } }