Skip to content

add icon to qrcode#291

Open
leilizhang wants to merge 2 commits intodavidshimjs:masterfrom
leilizhang:master
Open

add icon to qrcode#291
leilizhang wants to merge 2 commits intodavidshimjs:masterfrom
leilizhang:master

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