summaryrefslogtreecommitdiff
path: root/test.pl
diff options
context:
space:
mode:
Diffstat (limited to 'test.pl')
-rw-r--r--test.pl21
1 files changed, 21 insertions, 0 deletions
diff --git a/test.pl b/test.pl
new file mode 100644
index 0000000..f8fe405
--- /dev/null
+++ b/test.pl
@@ -0,0 +1,21 @@
+#!/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');