Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add icon to qrcode #291

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

leilizhang
Copy link

No description provided.

@oliveratgithub
Copy link

oliveratgithub commented Mar 15, 2023

Awesome contribution, thanks a lot!

Two issues / limitations…

  1. Any transparency in the base64 of the PNG image is being "discarded" (despite contained in base64-string)
  2. And unfortunately only accepts base64-encoded PNG image files – would be great if it would also work with SVG encoded to base64…

var _imageX = _canvasWidth / 2 - _imageW / 2;
var _imageY = _canvasHeight / 2 - _imageH / 2;
var _baseVal = 2;
_oContext.fillStyle = "#ffffff";
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
_oContext.fillStyle = "#ffffff";
_oContext.fillStyle = _htOption.colorLight;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants