Comments (11)
Could be related to this issue : #27
from jsqrcode.
the errors is in the archive findpat
this.selectBestPatterns = function()
{
var startSize = this.possibleCenters.length;
i don't know whats the problem.
from jsqrcode.
I have had the same error at the same line. Please see my comment on #27 . Here there is a solution http://stackoverflow.com/a/17086329. This is an iOS know bug, image taken by camera are squashed vertically, and need to be resized before used.
I have modified 'qrcode.js' to use these two functions from stackoverflow, replaced context.drawImage() call by drawImageIOSFix() and it's work for me.
from jsqrcode.
Thanks, i will try!
from jsqrcode.
i've been tryed and i have no success with iphone5.
Can you send me a example for your code?
from jsqrcode.
The problem that i have is not about show image... is about decode ... in iphone5 show the message error decode QR code... and in my galaxy s3 i don't have problems...
I send the picture to iphone that i took in my galaxy s3 and iphone read.....
Just when i take a photo in iphone it doesn't work
from jsqrcode.
Yeah that what I say, the problem come from the iphone camera somewhere returning wrong image size and then posing problem when trying to decode QR code.
In qrcode.js, try to add the two stackoverflow functions (detectVerticalSquash(), drawImageIOSFix(), see my previous comment) and then replace in qrcode.decode (still in qrcode.js) "context.drawImage(image, 0, 0, canvas_qr.width, canvas_qr.height );" by "drawImageIOSFix(context, image, 0, 0, image.width, image.height, 0, 0, nwidth, nheight);"
That should work, I have had exactly the same behavior as you, photo coming from another source work, photo taken from iphone doesn't.
from jsqrcode.
Thankksssss a lotttt mannnn!!!!!! It worksss!!!!
from jsqrcode.
You are welcome !
from jsqrcode.
Thank you sooooo much!!!!
I was looking for the solution to solve this problem..!
Finally, I found it!
It really works!!!
Thanksss!!!!
from jsqrcode.
Hum geez, I did this, and my picture is being squashed in the drawImage process.
I have a button which is triggered that calls drawImageIOSFix. Any ideas?
$("#getQr").bind('touchstart', function(e) {
var img = document.getElementById('img');
var canvas = document.getElementById('qr-canvas'); // reference to canvas element
var ctx = canvas.getContext('2d'); // get the canvas context;
drawImageIOSFix(ctx, img, 0, 0, img.width, img.height);
readQR();
});
from jsqrcode.
Related Issues (20)
- Doesnt work in Iphone devices HOT 4
- color
- Barkod Okuyucu
- prompt to ‘ flash.ccCapture is not a function’
- Failed to load the image HOT 1
- Can support 2D Data Matrix Code read HOT 1
- How to call the method from canvas using getusermedia HOT 1
- failed to load the image
- QR code unable to read HOT 2
- Here is a tutorial on how to use this library HOT 6
- [SOLVED]ios 11 - ios 12 black screen
- is not work on ios HOT 1
- What kind of tool is this ?
- Abnormal parsing result HOT 1
- Unable to open in chrome (not secure) http:// HOT 1
- Flashlight turn off on mobile HOT 1
- QR code containing Japanese characters HOT 1
- JavaScript Error HOT 1
- Can not decode QR code on iOS 13.1
- How to create a QRCode ? HOT 1
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 jsqrcode.