Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[imagickWithLogo.php] Logo is replacing area in center that causing generated QR not working #273

Unanswered
leojinno1 asked this question in Q&A
Discussion options

I'm using example 'imagickWithLogo.php' to generate QR code but look like the logo replace the dot in center area. This may lead to when I set logoSpaceWidth, logoSpaceHeight is quite big, generated QR not working any more.

  • Version addLogoSpace=true (not working):
    image
  • Version addLogoSpace=false:
    image

Is there any way that we can reserve blank area for logo without overlapping QR area or effect with QR functioning?

You must be logged in to vote

Replies: 1 comment

Comment options

Is there any way that we can reserve blank area for logo without overlapping QR area or effect with QR functioning?

Hi, the issue with the logo space is that it is taking away from the reserved error correction margin. The logo space size is internally limited to ~25% of the total modules in the matrix (30% is the maximum margin for ECC level H), however, it is not guaranteed that the QR Code remains readable in all cases.

A simple "fix" is to increase the QR Code version and decreasing the logo size to increase the error correction margin (you will need to add the code to proportionally scale the logo space, the SVG example does that). You can specify a minimum version QROptions::$versionMin = 7 for the auto detection, to ensure the QR Code remains readable.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /