Comments (14)
styled-qr-code/src/core/QRCanvas.ts
Line 123 in e09acc6
You inverted the algorithm.
It must be:
if (this._options.imageOptions.hideBackgroundDots) {
if (
j >= (count - drawImageSize.hideXDots) / 2 &&
j < (count + drawImageSize.hideXDots) / 2 &&
i >= (count - drawImageSize.hideYDots) / 2 &&
i < (count + drawImageSize.hideYDots) / 2
) {
return false;
}
}
from styled-qr-code.
from styled-qr-code.
;)
I'm glad to contribute with your project
from styled-qr-code.
Hello!
Yes indeed it seems that i
here corresponds to y
axis and j
corresponds to x
(albeit usually it is the opposite way)
styled-qr-code/src/core/QRCanvas.ts
Lines 212 to 213 in e09acc6
I don't have a deep understanding of this code so I'm not entirely sure what is the best way to fix it. Could you please open an issue or a PR in the upstream repo?
I'd be happy to merge the fix after that and release a new version. Thank you for your contribution!
from styled-qr-code.
The issue is on the filter itself, that skips dots to be printed on the QRCode.
if (filter && !filter(i, j)) {
continue;
}
Here's my PR: https://github.com/Loskir/styled-qr-code/pull/3/files
from styled-qr-code.
Well I'm not sure it is the right change to do either as it creates a discrepancy between filter(i, j)
and (j: number, i: number): boolean
from styled-qr-code.
@Loskir Hello! Were you able to fix that problem with the QR turning over?
from styled-qr-code.
I am running my fork in production and everything is working well
from styled-qr-code.
I am running my fork in production and everything is working well
You know that I have that problem in production, that the QR is turned around and does not center the logo space properly. How did you solve that in production? Locally I tried the change you recommend but in production that change is lost.
from styled-qr-code.
Estoy ejecutando mi bifurcación en producción y todo funciona bien.
How can I install your modifications?
from styled-qr-code.
I'm sorry, it worked well, but I am running the Loskir version, because I am using square images at this time.
from styled-qr-code.
I'm sorry, it worked well, but I am running the Loskir version, because I am using square images at this time.
I don't understand, it still appears vertical to me when I use a horizontal logo. Would you be kind to tell me what I should do to make it look good? In the local version, modify the code as you had indicated and it worked, but the production version did not.
from styled-qr-code.
Just came across this issue myself, the patch @iquirino created does seem to fix the issue. Any chance this will be published in the production package sometime soon?
from styled-qr-code.
Related Issues (6)
- Cannot find module './v6' from 'node_modules/skia-canvas/lib/index.js' HOT 8
- `fs` module not found HOT 2
- `GLIBC_2.27' not found HOT 2
- Error: Error loading shared library libfontconfig.so.1: No such file or directory (needed by /app/node_modules/skia-canvas/lib/v6/index.node) HOT 1
- Issues when embedding SVG images in center
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from styled-qr-code.