Code Monkey home page Code Monkey logo

qart.js

CDNJS Downloads Version License
Merges Pictures and QR Codes for Artistic QR Codes.

Glance At

https://kciter.github.io/qart.js/

Installation

NPM

$ npm install qartjs

or clone this repository and copy qart.min.js to your project.

CDN

<script src="//cdnjs.cloudflare.com/ajax/libs/qartjs/1.0.2/qart.min.js"></script>

Usage

In the browser

<script src="../dist/qart.min.js"></script>
<script>
  // directly appending canvas to the document
  new QArt({
    value: value,
    imagePath: './example.png',
    filter: filter,
    size: 195
	}).make(document.getElementById('qart'));

	// using callback
	new QArt({
      value: value,
      imagePath: './example.png',
      filter: filter,
      size: 195
  	}).make(function (canvas) {
  	  document.getElementById('qart').appendChild(canvas)
  	});
</script>

With ES6

import QArt from 'qartjs';
const qart = new QArt({
  value: value,
  imagePath: './example.png',
  filter: filter,
  size: 195
});

// directly appending canvas to the document
qart.make(document.getElementById('qart'))

// using callback
qart.make((canvas) => {
  document.getElementById('qart').appendChild(canvas);
});

With React

This is a simple implementation of QArt as React Component. react-qart

With Angular.JS

There is a directive available for using qart.js in Angular.js: angular-qart

With Vue 2.x

There is a directive available for using qart.js in Vue.js 2.x : vue-qart

Options

Field Type Description Default
value String The data of the QR code. Required
imagePath String The path of the combined image. Required
filter String Define an image filter. threshold or color threshold
size Integer Define an image size in pixels. 195
version Integer QRCode version (1 <= version <= 40) 10
background CSSColor Implement background if exist undefinded
fillType scale_to_fit/fill Place image type(fill or scale to fit) scale_to_fit

Dependency

Inspire

TODO

  • Server-Side Rendering.
  • CLI Command.

Donate

If you like this open source, you can sponsor it. 😄

Paypal me

LICENSE

GPLv3

hookcell's Projects

add-aarch64-qemu icon add-aarch64-qemu

An ARM base image that includes the modified QEMU from https://github.com/resin-io/qemu/commits/qemu-execve

bhima icon bhima

A hospital information management application for rural Congolese hospitals

bup icon bup

Very efficient backup system based on the git packfile format, providing fast incremental saves and global deduplication (among and within files, including virtual machine images). Current release is 0.29.1, and the development branch is master. Please post problems or patches to the mailing list for discussion (see the end of the README below).

chateau icon chateau

Another (awesome) data explorer for RethinkDB

distribution icon distribution

The Docker toolset to pack, ship, store, and deliver content

dns-proxy-server icon dns-proxy-server

Solve your DNS hosts from your docker containers, then from your local configuration, then from internet

docsify icon docsify

🃏 A magical documentation site generator.

geogram icon geogram

A simple application to lookup Instagram photos by location.

gitbucket icon gitbucket

A Git platform powered by Scala with easy installation, high extensibility & GitHub API compatibility

gitfs icon gitfs

Version controlled file system

githubdb icon githubdb

A Lightweight Cloud based JSON Database with a MongoDB like API for Node.

jsqr icon jsqr

A pure javascript QR code reading library. This library takes in raw images and will locate, extract and parse any QR code found within.

leaflet-providers icon leaflet-providers

An extension to Leaflet that contains configurations for various free tile providers.

legalstream icon legalstream

An m3u8 playlist featuring many LEGALLY FREE IPTV streams. For use with VLC.

minio icon minio

Minio is an open source object storage server compatible with Amazon S3 APIs

mkdocs icon mkdocs

Project documentation with Markdown.

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.