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 fd71310 commit e5863c9Copy full SHA for e5863c9
lib/Common/HybridBinarizer.php
@@ -266,7 +266,7 @@ private static function thresholdBlock(
266
for ($y = 0, $offset = $yoffset * $stride + $xoffset; $y < self::$BLOCK_SIZE; $y++, $offset += $stride) {
267
for ($x = 0; $x < self::$BLOCK_SIZE; $x++) {
268
// Comparison needs to be <= so that black == 0 pixels are black even if the threshold is 0.
269
- if (($luminances[(int)round($offset + $x)] & 0xFF) <= $threshold) {
+ if ((((int)$luminances[(int)round($offset + $x)]) & 0xFF) <= $threshold) {
270
$matrix->set($xoffset + $x, $yoffset + $y);
271
}
272
0 commit comments