Git Product home page Git Product logo

qrcode's Introduction

QRCode

QR Code in Elixir.

demo

Spec:

  • Version: 1 - 7
  • ECC level: L
  • Encoding mode: Byte

References:

Slide:

Usage

$ iex -S mix
iex> QRCode.encode("https://www.google.com") |> QRCode.render()
iex> QRCode.encode("你好,世界!") |> QRCode.render()
iex> QRCode.encode("unicode support 😃") |> QRCode.render()

Draw custom pattern

  1. Start with the data you want to encode, along with all 0s pattern.
iex> data = QRCode.encode("https://github.com/sunboshan/qrcode", <<0::600>>)
  1. Choose to render QR Code in normal position or rotate 90 degree clockwise.
iex> QRCode.render(data)
iex> QRCode.render2(data)

  1. Draw a custom pattern by changing bits in the second parameter.
iex> QRCode.encode("https://github.com/sunboshan/qrcode", <<0b110110101010110101101101101010101101011010110110101010110110100101111101101011010110101011101010110101011010101011011101010101010001010100010101000101010101000101010001010101000001010001010100000000000111010101110111011111110101011101010111010111110101100000000000000000000111000110011001100110011111100111011011000111011001100000000000000000000110010001100100011111100101011001000110010011100101100000000000000000000101010101010101010101010101010101010101010101010101000000000001101111001101010011011101000101000101000101010100010100010100010101000101000101110101010101101010000000000000000000000000::600>>) |> QRCode.render2()

qrcode's People

Contributors

sunboshan 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

Watchers

 avatar

qrcode's Issues

QRCode Matrix nil query

Hi.
In our a project we use this library following way:

QRCode.encode("http://localhost:4040/events//Users/smita/projects/elixir/fotobouda/server/photo/tmps/2018-07-28_07-44-15-809348_original-ocwo.jpg")

And as you can see in terminal output, the QRCode.Matrix contains a couple of nils or with render function:

qrcode-nil

Is that correctly behaviour?

I don’t know if this is fine. We’re working with this matrix further in project (we transform the matrix to svg). Can I assume if this turquoise color (I think that color is came from my terminal setting.) we’ll change to white the functionality of QR would be still okay?

hex.pm

Hi,
have you considered the addition of this library to hex.pm?
Best regards O.T.

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.