NAME

Data::Petitcom - Data converter for Petitcom mkII

SYNOPSIS

use Data::Petitcom;

my $prg = <<'EOP';
PRINT "Hello World"
EOP
my $qrcodes = QRCode($prg, type => 'term', version => 5);
my $qr_num = @$qrcodes;
for my $i ( 1 .. $qr_num ) {
    printf(
        "QR: %d / %d\n%s\n",
        $i,
        $qr_num,
        $qrcodes->[ $i - 1 ],
    );
}


use Path::Class;
use GD::Tiler;
my $bmp = '8b_256x192.bmp';
my $raw_bmp = file($bmp)->slurp;
my $qrcodes = QRCode($raw_bmp, resource => 'GRP', name => 'TEST_GRP', type => 'img');
my $tiled = GD::Tiler->tile(
    Images       => $qrcodes,
    Background   => 'white',
    ImagesPerRow => 3,
);
file('qrcodes.png')->open('>')->print($tiled);

DESCRIPTION

Data::Petitcom is data converter for Petitcom mkII.

following resources supported.

PRG: Program
GRP: Graphics (256x192 pixels 8bit-color bitmap)
CHR: User character (256x64 pixels 8bit-color bitmap)
COL: Color (8bit-color bitmap)

FUNCTIONS

Exported Functions

Save($raw_data, %opts)

Turn raw data into PTC.

Load($raw_ptc, %opts)

Turn PTC into raw data.

QRCode(($raw_ptc|$raw_data|$obj_ptc), %opts)

Returns barcode for the data (or object) specified.

Exportable Functions

SaveFile($ptc_file, $raw_data, %opts)

Writes the PTC to a file.

LoadFile($ptc_file, %opts)

Reads the PTC from a file.

AUTHOR

hayajo <hayajo@cpan.org>

SEE ALSO

プチコンmkII

Petit Computer

LICENSE

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