#!/usr/bin/env perl
use strict;
use warnings;
use Data::QRCode;
use Imager::QRCode::Fancy;
use Imager;

my $string = 'simple test string, but a bit long just in case we get a too-small QR code';
my $data = Data::QRCode->new(
    $string,'H',
);

my $src_img = Imager->new(
    file=>'/tmp/faccione.png',
)->scale(scalefactor=>2,qtype=>'mixing');

my $img = Imager::QRCode::Fancy::make({
    qr_code => $data,
    image => $src_img,
});
$img->write(file=>'/tmp/qr2.png');
