Giter Site home page Giter Site logo

erwanvivien / fast_qr Goto Github PK

View Code? Open in Web Editor NEW
183.0 3.0 26.0 7.18 MB

Ultra fast QRCode generation

Home Page: https://fast-qr.com/

License: MIT License

Rust 95.97% Shell 0.18% Python 0.58% JavaScript 3.15% PowerShell 0.12%
grcode qrcode-generator qrcode-generator-rust qrgen qrcodegen qr-gen qrcode-gen rust wasm webassembly

fast_qr's People

Contributors

akhildevelops avatar antoniosbarotsis avatar borber avatar epicericee avatar erwanvivien avatar johnthecoolingfan avatar katopz avatar kianmeng avatar lycoon avatar maxnachlinger avatar parasyte avatar vahanbgs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

fast_qr's Issues

FYI: AGPL licensing

This is a nice library, and fast too (I ran my own benchmarks as well) :) Sadly I cannot use it for work due to its AGPL license.

You probably know that AGPL requires modified code to be shared with the public and remain under the AGPL license. Also any code linked to the GPL/AGPL code (either dynamically or statically) is considered a combined work and the entire combination must be licensed under GPL/AGPL. So the code I write for work would also have to be open sourced as GPL/AGPL.

Sadly my employer won't want to share the rest of our codebase that might use this library.

Why is `Shape::Command` disabled on wasm?

I'm developing a project that is compiled to wasm (cloudflare worker) and needs to generate qr codes with custom visual processing when converting to an image. I've completed the processing using the command shape variant, but now I need to use it in wasm.

Why is it disabled for wasm? I don't think there are any issues preventing it being enabled, as it's just a function pretty much.

An explanation would be appreciated, or a patch to remove the disabling on wasm arch.

Image branding

Hey, just wanna know if there is wayt to brand the QR code generated, like colors and logo.

Add customization of error code level (ecl)

At the moment fast_qr (javascript/wasm interface) always uses the default error code level (ecl) of Q (25%). It would be desirable if this can be configured through SVGOptions.

e.g.

const options = new SvgOptions()
  .ecl(ECL.Q);

NodeJS support?

Would be nice if this library also worked in NodeJS, since there are no functioning qrcode generation libraries with high performance for NodeJS right now

Transparent backgrounds

First of all, great crate, I'm using it in a Discord bot.

Discord has 2 themes, dark and light. I would want to use a module color that fits both dark and light, but in order to do that, I need transparent backgrounds.

In your opinion, how hard would that be to make? I looked into the SVG this crate worked with, but didn't see any transparency options at first glance.

If in your opinion it shouldn't be so hard, I might want to take a stab at it :)

Make wasm-bindgen optional

This crate, as of the time of writing, only has a single dependency (wasm-bindgen) which is great! But I wonder whether even this dependency could be made optional for those of us who don't need wasm-bindgen.

QR Codes are Diagonally Inverted When Rendered as SVGs/PNGs

Hey! Big fan of the library, though I came across a strange issue the other day.

Seems as though the QR codes are rendered with a diagonal inversion for image/svg output.

This can be verified by looking at the format information (as per ISO/IEC 18004 2015), specifically the first two error correction bits and their placement.

This diagram from Wikipedia summarizes the expectations of the format sequence.
https://en.wikipedia.org/wiki/File:QR_Format_Information.svg


I used this snippet to create the QRCode for the following tests:

    let qrcode = QRBuilder::new("Test")
        .ecl(ECL::M)
        .version(Version::V01)
        .build()
        .unwrap();

With an ECL::M, we expect to see the ECL sequence of [1,0].

In the following images, the red and blue borders highlight the format sequences, with the green highlighting the ECL sequence.

When printing to our terminal, we see the format sequences aligned correctly:

printed_to_terminal

However, when rendering an SVG or PNG, we notice the diagonal inversion, causing inversion of the format sequences:

rendered_as_image

Note that the rest of the QR code is also diagonally inverted.

Benchmarking fails in ubuntu

Benchmarking fails in ubuntu with below error:

vscode/workspaces/fast_qr (master) $ /bin/python3.11 /workspaces/fast_qr/benches/bench.py
| Benchmark                | Lower     | Estimate  | Upper     |                          |
|:------------------------ |:---------:|:---------:|:---------:| ------------------------ |
Traceback (most recent call last):
  File "/workspaces/fast_qr/benches/bench.py", line 90, in <module>
    f"| {test2:<24} | {data2[0]:<9} | {data2[1]:<9} | {data2[2]:<9} |",
                       ~~~~~^^^
IndexError: list index out of range

After debugging found that microsecond is represented as u instead of unicode char µ. This is not helping to extract microseconds value from the output of criterion benchmark.

Support for terminals with light backgrounds

Thank you for your work!
I want to replace qrcode with your crate, Is it possible to implement like this for supports both dark and light colored terminals

    let code = QrCode::new("mow mow").unwrap();
    let image = code.render::<unicode::Dense1x2>()
        .dark_color(unicode::Dense1x2::Light)
        .light_color(unicode::Dense1x2::Dark)
        .build();
    println!("{}", image);

QR generated with V40 ImageBuilder with Pixmap generates Garbled PNG image

High. I was trying to generate a QR as a PNG to I could integrate it into a an tag on a webassembly module I' building but every single time in generates a garbled image. I don't know what step I'm missing to do over the produced [u8] so align the data of if it is in reality an issue with a dependency.

The shortest example I can provide is:

Cargo.toml

[package]
name = "foo"
version = "0.1.0"
authors = ["Rust Example <[email protected]>"]

[dependencies]
fast_qr = { version = "0.8.4", features = ["image"] }
base64 = "0.21.0"

main.rs

use fast_qr::{
    convert::{image::ImageBuilder, Builder},
    QRBuilder, Version, ECL,
};


fn main() {
    

    let qrcode = match QRBuilder::new("datos de prueba para salir".to_string().as_bytes())
        .ecl(ECL::H)
        .version(Version::V40)
        .build() {
	    Ok(qr) => qr,
	    Err(why) => {
		panic!("Failed generating Qr Code: {why:?}");
	    }
	};

    let pixmap = ImageBuilder::default()
        .background_color([255, 255, 255, 0]) // transparency
        .to_pixmap(&qrcode);

    let Ok(url_encoded_data)  = pixmap.encode_png().map(|x| base64::encode(&x[..]) ) else {
	panic!("could not base64 encode generated QR from string '");
    };

    let src = format!("data:image/png;base64,{url_encoded_data}");

    println!("{src}");

    
}

The print at the end produces the URL encoded data that is supposed to be used on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7b3Ca/1leXa2JhjX0ilYfHrwnnzXpY+3Ieer4OKRF1ZXXXPVxOT2O+Jh7Rtc9ap/4kN9jJ7qzXhxSruKa+XfXcf9btRPWWvqz+1CfOlgjOZ4+sMZn+Vobbo1eQX44pB/NW/tZZA919oEJuepFQzVy4dGwhnzqXoF1r3B7hu/wamJXtRcOzbEWfxbTC4ozet5yJnsJ+8Fb1qi9ty69oXikx717qreXsB/k4WdjekPxij2OzmwvYT9Ya+gtJDZxIVl0kTtQn3zlip7RWRvUT7xKp2/QXonRe1brmx4jyon4uDhL1z6Vn7lH7fXKPY72GfdLDdxC0SYuxEv8kS+vVA3+LKYXFGf0vOVM9hL2g7esUXtvXXpDca3HmKPrXnRdSx/l40Nxy5r0UR8O6VvXqxXqofUj58nxcUiHQ5qPQzq8Il+oqX60XA/JTsolRTC2OhrycEiHn6H1GOMn7jGeebwneqyh+TXG2dYcfpSvnhpRe9d89dWJe/O13nox9q01Y0598vhneTVjHK3Zao6SNuTDFEbDePL0xLb7F5c5j9fMo10+mS8ZPqLcFl7STVxIXXCx3j3E+BPnBL5qAt7dvKv1DO88hbUAf1fEXCI+XOS7F18vuYlv/xXCR+dhvnUtXedKz7wprGE2K3ubfXR/UTdxIYZ3oe9AM3n4LjmNUydgzml4NO+/nHfvRzPJvHZ4c+Fu1RRzAj9oAvMlv/dhzfofN4H5kv+4RzYPfO8E5kt+78Rm/Y+bwP8Bizi0fHU3YDcAAAAASUVORK5CYII=

The image can be downloaded from here : https://ibb.co/Y3n4q5T

I'll appreciate any guidance on the topic

Remove `Cargo.lock`

According to the Cargo book

If you’re building a non-end product, such as a rust library that other rust packages will depend on, put Cargo.lock in your .gitignore.

I came across an issue while upgrading to 0.8.0 because I also required png = "0.17.7" while fast_qr lists png = "0.17.6".

In my case it doesn't matter but this could cause future annoyance (or actual issues) to someone else. Perhaps we should remove main.rs and put the contained code into an examples directory (which you can run easily with cargo).

I could make a pr for this if you agree sometime soon-ish :)

wasm-bindgen feature

For use via wasmi, wasm-bindgen is a problem, would you consider putting it behind a feature? If it's straightforward I could probably even find time to create a PR if you're interested, I have a temporary fix in my fork here

Prints top margin

fast_qr/src/helpers.rs

Lines 31 to 37 in 11fc725

print!("{}", BOTTOM);
print_line(
&[Module::empty(true); 177],
&[Module::empty(false); 177],
qr.size,
);
println!("{}", BOTTOM);

Is this paragraph for beauty? Because I think the following code should be faster

// Prints top margin without background
    println!("{}", BOTTOM.to_string().repeat(qr.size + 2));

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.