Skip to content

How to make circle border like this in Png #267

Answered by codemasher
AmjadGhzlangit asked this question in Q&A
Discussion options

You must be logged in to vote

You don't need to double ping me, time zones exist.

There is an SVG example for exactly this over here https://github.com/chillerlan/php-qrcode/blob/v5.0.x/examples/svgWithLogoAndCustomShapes.php

It would work a bit different and probably more complex in GD/Imagemagick: you would need to skip the generation of the finder patterns in the respective module() methods, and then draw replacements (or insert images) in their positions.

You can calculate the positions from the image size:

  • the width/height of the finder patterns is 7 * $this->scale
  • the width of the QR symbol (excluding quietzone) is $this->matrix->getVersion()->getDimension() * $this->scale
  • the quietzone width is $this->options-…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@AmjadGhzlangit
Comment options

@AmjadGhzlangit
Comment options

@codemasher
Comment options

Answer selected by AmjadGhzlangit
@AmjadGhzlangit
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants