Skip to content

Commit 2f0b169

Browse files
committed
💄
1 parent 6305619 commit 2f0b169

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/Decoder/Binarizer.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -204,12 +204,11 @@ private function getHistogramBlackMatrix(int $width, int $height):BitMatrix{
204204
* @see http://groups.google.com/group/zxing/browse_thread/thread/d06efa2c35a7ddc0
205205
*/
206206
private function calculateBlackPoints(int $subWidth, int $subHeight, int $width, int $height):array{
207-
$blackPoints = [];
207+
$blackPoints = array_fill(0, $subHeight, array_fill(0, $subWidth, 0));
208208

209209
for($y = 0; $y < $subHeight; $y++){
210-
$yoffset = ($y << self::BLOCK_SIZE_POWER);
211-
$maxYOffset = ($height - self::BLOCK_SIZE);
212-
$blackPoints[$y] = [];
210+
$yoffset = ($y << self::BLOCK_SIZE_POWER);
211+
$maxYOffset = ($height - self::BLOCK_SIZE);
213212

214213
if($yoffset > $maxYOffset){
215214
$yoffset = $maxYOffset;

0 commit comments

Comments
 (0)