The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

GD::Barcode::Image - Create Image::Magick object for a barcode

SYNOPSIS

  use GD::Barcode::Image;

  my $oGdBarIm = GD::Barcode::Image->new( $type, $text, \%rhPrm );
  die "** Error: Barcode $type failed for $text: ${GD::Barcode::errStr}," 
    unless ($oGdBarIm);

  my $oGdIm = $oGdBarIm->plot_imagick( Height => I<pixels>, NoText => I<0 | 1>] );
  die "** Error: Image Conversion Failed: ${GD::Barcode::errStr}," 
    unless ($oGdBarIm);

DESCRIPTION

This module adds minor extensions in functionality to the GD::Barcode module. See the documentation for GD::Barcode and all its barcode symbology types for additional information on the use of this module.

new()

$oGdBarIm = GD::Barcode::Image->new($sType, $sTxt, \%rhPrm);

Constructor. Creates a GD::Barcode::Image object for text $sTxt, for barcode symbology type $sType. Additional parameters can be provided for QRcode type - see GD::Barcode::QRcode module in the GD::Barcode package.

plot_imagick()

$oGdIm = $oGdBarIm->plot_imagick([Height => $iHeight, NoText => 0 | 1]);

creates Image::Magick object for the barcode object. $iHeight is height of the image. If NoText is 1, the image has no text image of $sTxt. Height and NoText parameters will not apply to the QRcode barcode type.

plot_gd()

$oGd = $oGdBarIm->plot_gd([Height => $iHeight, NoText => 0 | 1]);

Same as plot_imagick() except that a GD image object is returned.

$GD::Barcode::errStr

has error message. This is same error mechanism as in the GD::Barcode module.

barcodegen

This module also includes the command-line script barcodegen that can be used to create barcode images in various formats: GIF, JPEG, PNG, EPS, PDF.

AUTHOR

Avinash Chopde <avinash@aczoom.com> http://www.aczoom.com/

COPYRIGHT

Copyright (C) 2007 Avinash Chopde <avinash@aczoom.com> www.aczoom.com

LICENSE

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

SEE ALSO

barcodegen

GD::Barcode