diff --git a/src/Data/QRMatrix.php b/src/Data/QRMatrix.php index ea4198174..05c8b9069 100755 --- a/src/Data/QRMatrix.php +++ b/src/Data/QRMatrix.php @@ -595,12 +595,12 @@ final class QRMatrix{ throw new QRCodeDataException('ECC level "H" required to add logo space'); } - // we need uneven sizes, adjust if needed - if(($width % 2) === 0){ + // we need uneven sizes to center the logo space, adjust if needed + if($startX === null && ($width % 2) === 0){ $width++; } - if(($height % 2) === 0){ + if($startY === null && ($height % 2) === 0){ $height++; }