Imager::QRCode - Generate QR Code with Imager using libqrencode


NAME

Imager::QRCode - Generate QR Code with Imager using libqrencode


SYNOPSIS

    use Imager::QRCode;
    my $qrcode = Imager::QRCode->new(
        size          => 2,
        margin        => 2,
        version       => 1,
        level         => 'M',
        casesensitive => 1,
        lightcolor    => Imager::Color->new(255, 255, 255),
        darkcolor     => Imager::Color->new(0, 0, 0),
    );
    my $img = $qrcode->plot("blah blah");
    $img->write(file => "qrcode.gif");
    # or instance method
    use Imager::QRCode qw(plot_qrcode);
    my $img = plot_qrcode("blah blah", \%params);
    $img->write(file => "qrcode.gif");


DESCRIPTION

This module allows you to generate QR Code with Imager. This module use libqrencode '2.0.0' and above.


METHODS

new
    $qrcode = Imager::QRCode->new(%params);

The new() constructor method instantiates a new Imager::QRCode object. new() accepts the following parameters.

plot($text)
    $img = $qrcode->plot("blah blah");

Create a new QR Code image. This method returns Imager object ploted QR Code with the given text.


INSTANT METHODS

plot_qrcode($text, \%params)
Instant method. $text is input text. %params is same paramater as new().


SEE ALSO

Imager, http://www.qrcode.com/, http://megaui.net/fukuchi/works/qrencode/index.en.html


AUTHOR

Yoshiki KURIHARA <kurihara __at__ cpan.org>


THANKS

Tokuhiro Matsuno


LICENCE AND COPYRIGHT

Copyright (c) 2011, Yoshiki KURIHARA <kurihara __at__ cpan.org>.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See the perlartistic manpage.

 Imager::QRCode - Generate QR Code with Imager using libqrencode