Giter Site home page Giter Site logo

qrpimp's Introduction

QrPimp

Means to prettify those hideously boring QR-codes.

For example:

Boring QR Not boring

Requirements:

ImageMagick should be in installed, obviously. That is all.

Installation:

Copy QrPimp.php to your project folder (well, you should probably know better where to put it). Include it in your project and transform those ugly ducklings of QR-codes into beautiful swans (no, it won't really happen, but one may dream).

Usage:

<?php
require_once 'QrPimp.php';
// Load boring QR-code
$pimpedQR = QrPimp::magic(new Imagick('img/qr.png'));
// Display shiny one
header('Content-Type: image/' . $pimpedQR->getImageFormat());
echo $pimpedQR;
?>

Customization:

To be explained. For now, consult comments for method QrPimp::style()

NB:

  • Too much magic, and your QR won't be readable at all;
  • Depending on server configuration may slow down (a little) QR-code generation;
  • magic() method cycles through high-contrast colors and maintains high degree of readability;
  • style() should be customized - otherwise generate random colors (palette can be adjusted);
  • batch() will directly process file/files using magic();
  • To run tests see/modify example.php.

Should be done:

  • Additional customization;
  • Color palette from QR-code data;
  • Logo/palette overlay/dissolve;
  • Readability optimization.

qrpimp's People

Contributors

xifax avatar

Watchers

James Cloos avatar Kim Schulz avatar

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.