@@ -152,7 +152,8 @@ |
||
152 | 152 | } |
153 | 153 | } |
154 | 154 | } |
155 | - catch(Throwable $aioobe){//ArrayIndexOutOfBoundsException |
|
155 | + catch(Throwable $aioobe){ |
|
156 | +//ArrayIndexOutOfBoundsException |
|
156 | 157 | // This feels wrong, but, sometimes if the finder patterns are misidentified, the resulting |
157 | 158 | // transform gets "twisted" such that it maps a straight line of points to a set of points |
158 | 159 | // whose endpoints are in bounds, but others are not. There is probably some mathematical |
@@ -59,7 +59,7 @@ |
||
59 | 59 | $count = count($pixels); |
60 | 60 | |
61 | 61 | for($i = 0; $i < $count; $i += 3){ |
62 | - $this->setLuminancePixel($pixels[$i] & 0xff, $pixels[$i + 1] & 0xff, $pixels[$i + 2] & 0xff); |
|
62 | + $this->setLuminancePixel($pixels[$i]&0xff, $pixels[$i + 1]&0xff, $pixels[$i + 2]&0xff); |
|
63 | 63 | } |
64 | 64 | } |
65 | 65 |
@@ -60,7 +60,7 @@ |
||
60 | 60 | protected function setLuminancePixels():void{ |
61 | 61 | |
62 | 62 | if($this->options->readerGrayscale){ |
63 | - imagefilter($this->gdImage, IMG_FILTER_GRAYSCALE); |
|
63 | + imagefilter($this->gdImage, IMG_FILTER_GRAYSCALE); |
|
64 | 64 | } |
65 | 65 | |
66 | 66 | if($this->options->readerIncreaseContrast){ |
@@ -129,7 +129,7 @@ |
||
129 | 129 | |
130 | 130 | // scale down to the expected size |
131 | 131 | if($this->options->drawCircularModules && $this->options->scale <= 20){ |
132 | - $this->image = imagescale($this->image, $this->length/10, $this->length/10, IMG_BICUBIC); |
|
132 | + $this->image = imagescale($this->image, $this->length / 10, $this->length / 10, IMG_BICUBIC); |
|
133 | 133 | } |
134 | 134 | |
135 | 135 | if($this->options->returnResource){ |
@@ -70,7 +70,7 @@ |
||
70 | 70 | * @return string|\Imagick |
71 | 71 | */ |
72 | 72 | public function dump(string $file = null){ |
73 | - $file ??= $this->options->cachefile; |
|
73 | + $file ??= $this->options->cachefile; |
|
74 | 74 | $this->imagick = new Imagick; |
75 | 75 | |
76 | 76 | $this->imagick->newImage( |