mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-08-28 11:07:25 +00:00
gonna leave it that way...
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
*/
|
||||
|
||||
namespace chillerlan\QRCode\Output;
|
||||
use chillerlan\QRCode\Data\QRCodeDataException;
|
||||
|
||||
use chillerlan\QRCode\QRCode;
|
||||
|
||||
/**
|
||||
|
||||
+7
-8
@@ -83,7 +83,7 @@ class QRCode{
|
||||
protected $darkCount;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
* @var float
|
||||
*/
|
||||
protected $minLostPoint;
|
||||
|
||||
@@ -156,6 +156,7 @@ class QRCode{
|
||||
break;
|
||||
}
|
||||
|
||||
// see, Scrunitizer, it is concrete! :P
|
||||
$qrDataInterface = [
|
||||
QRConst::MODE_ALPHANUM => AlphaNum::class,
|
||||
QRConst::MODE_BYTE => Byte::class,
|
||||
@@ -348,14 +349,12 @@ class QRCode{
|
||||
$this->lostPoint = 0;
|
||||
$this->darkCount = 0;
|
||||
|
||||
$range1 = range(0, $this->pixelCount-1);
|
||||
$range2 = range(0, $this->pixelCount-2);
|
||||
$range3 = range(0, $this->pixelCount-7);
|
||||
$range = range(0, $this->pixelCount-1);
|
||||
|
||||
$this->testLevel1($range1);
|
||||
$this->testLevel2($range2);
|
||||
$this->testLevel3($range1, $range3);
|
||||
$this->testLevel4($range1);
|
||||
$this->testLevel1($range);
|
||||
$this->testLevel2(range(0, $this->pixelCount-2));
|
||||
$this->testLevel3($range, range(0, $this->pixelCount-7));
|
||||
$this->testLevel4($range);
|
||||
|
||||
$this->lostPoint += (abs(100 * $this->darkCount / $this->pixelCount / $this->pixelCount - 50) / 5) * 10;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user