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

Fix Options example for toDataURL, remove stale TS warning #312

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,8 @@ With precompiled bundle:
```html
<canvas id="canvas"></canvas>

<script src="/build/qrcode.min.js"></script>
<script src="/build/qrcode.tosjis.min.js"></script>
<script src="/build/qrcode.js"></script>
<script src="/build/qrcode.tosjis.js"></script>
<script>
QRCode.toCanvas(document.getElementById('canvas'),
'sample text', { toSJISFunc: QRCode.toSJIS }, function (error) {
Expand Down Expand Up @@ -350,8 +350,6 @@ QRCode.toFile(
)
```

TypeScript users: if you are using [@types/qrcode](https://www.npmjs.com/package/@types/qrcode), you will need to add a `// @ts-ignore` above the data segment because it expects `data: string`.

## Multibyte characters
Support for multibyte characters isn't present in the initial QR Code standard, but is possible to encode UTF-8 characters in Byte mode.

Expand Down Expand Up @@ -480,11 +478,13 @@ Callback function called on finish.
var opts = {
errorCorrectionLevel: 'H',
type: 'image/jpeg',
quality: 0.3,
margin: 1,
color: {
dark:"#010599FF",
light:"#FFBF60FF"
dark: "#010599FF",
light: "#FFBF60FF"
},
rendererOpts: {
quality: 0.3
}
}

Expand Down