Skip to content

Instantly share code, notes, and snippets.

@adulau
Created December 6, 2010 20:56
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save adulau/730930 to your computer and use it in GitHub Desktop.
Save adulau/730930 to your computer and use it in GitHub Desktop.
VCARD to QRcode
#!/usr/bin/perl
#
use GD::Barcode::QRcode;
open(X, ">./out.png");
binmode(X);
my $vcard = "
BEGIN:VCARD
N:Lastname;Firstname
EMAIL:Firstname.Lastname\@example.com
END:VCARD
";
print X GD::Barcode::QRcode->new($vcard, { Ecc => 'Q', Version=>7, ModuleSize => 2})->plot->png;
close(X);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment