We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8df4a7a commit 0c1f322Copy full SHA for 0c1f322
src/Decoder/Binarizer.php
@@ -339,7 +339,7 @@ private function calculateThresholdForBlock(
339
for($j = 0, $o = $yoffset * $width + $xoffset; $j < self::BLOCK_SIZE; $j++, $o += $width){
340
for($i = 0; $i < self::BLOCK_SIZE; $i++){
341
// Comparison needs to be <= so that black == 0 pixels are black even if the threshold is 0.
342
- if(($luminances[$o + $i] & 0xff) <= $average){
+ if(((int)($luminances[$o + $i]) & 0xff) <= $average){
343
$matrix->set($xoffset + $i, $yoffset + $j);
344
}
345
0 commit comments