Coder Social home page Coder Social logo

Comments (8)

nayuki avatar nayuki commented on August 18, 2024

Hi amvtek, thank you for the feedback. I understand the problem you are describing.

My library has currently no support for ECI, but I can add it sometime this week. I had no idea this niche feature had real-world usage. Please provide examples of good QR Codes for your application in mind, so that I can check my upcoming work.

For JavaScript, I am thinking of designing the API such that your code would look something like this:

var bytes = [3, 0, 9, 81, 255];
var eciAssignment = 31337;
var segments = [qrcodegen.QrSegment.makeEci(eciAssignment), qrcodegen.QrSegment.makeBytes(bytes)];
var qr = qrcodegen.QrCode.encodeSegments(segments, qrcodegen.QrCode.Ecc.LOW);

from qr-code-generator.

amvtek avatar amvtek commented on August 18, 2024

Hello Nayuki,

thank you for your feedback.

Our QR codes contain cryptographic public key information, you can have a look here to get a feel of what use cases we are trying to enable https://www.amvtek.com/projects/kerpass-ust/

For test purpose we are using [255, 254, 253, ...0] repeated 2 times ( 512 bytes is maximum payload size in this project. For now we are using NUMERIC mode to encode bytes by group of 6 ( 12 hexa digits --> 15 decimal digits). This allow using capacity better than with base64 in the case of QR.

Your support is greatly appreciated, I will let you know if adding ECI segment allow binary to be decoded successfully by machine vision library.

Bests regards,
Marc

from qr-code-generator.

nayuki avatar nayuki commented on August 18, 2024

Okay. Can you show examples of QR codes with ECI that scan successfully, along with their input description? I want to be able to replicate them exactly to the bit.

from qr-code-generator.

amvtek avatar amvtek commented on August 18, 2024

Hello Nayuki,

for now on our side we haven't had the opportunity to attend scanning a barcode containing an ECI segment. Our assumption that it could solve problem decoding BYTE QrCode with google machine vision library come from here http://stackoverflow.com/questions/38398840/qr-codes-raw-binary-data/38506751

The person who reported to stackoverflow claims he managed to insert an ECI header using libqrencode. I looked there and ECI support is unclear as the doc claims that library does not currently support it.

The only encoder I found that appears to have partial support for ECI appears to be the zxing one, see here https://github.com/zxing/zxing/blob/master/core/src/main/java/com/google/zxing/qrcode/encoder/Encoder.java . I will try later on on my side to generate some barcode with ECI using zxing or your code after modification.

Best regards,
Marc

from qr-code-generator.

nayuki avatar nayuki commented on August 18, 2024

Oh I see. I think I know what is going on now. Give me a bit of time to implement and validate some new code. In the meantime, a donation to Project Nayuki would be appreciated!

from qr-code-generator.

amvtek avatar amvtek commented on August 18, 2024

OK Nayuki,
I will look to your suggestion.

Bests,
Marc

from qr-code-generator.

nayuki avatar nayuki commented on August 18, 2024

ECI segment functionality has been added. Please try out the new API and see if it produces QR Codes that work correctly in your application.

from qr-code-generator.

amvtek avatar amvtek commented on August 18, 2024

Hello,
we tested on our side and it worked

We used 1 as ECI segment value when encoding which apparently corresponds to ISO-8859-1.
Thank you very much for this, I think we shall mention this somewhere, as potentially zxing & machine vision barcode reading libraries won't let you recover encoded binaries without such segment

Bests,
Marc

from qr-code-generator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.