Image::Checkerboard - Image generator for checkboards.
use Image::Checkerboard; my $image = Image::Checkerboard->new(%parameters); my $suffix = $image->create($path); my $type = $image->type($type);
new
my $image = Image::Checkerboard->new(%parameters);
Constructor.
Returns instance of object.
bg
Background color. Default value is 'black'.
flip
Flip flag. Means that each next video has reversed foreground and background. Default value is 1.
fg
Foreground color. Default value is 'white'.
height
Image height. Default value is 1080.
type
Image type. Possible types are: - bmp - gif - jpeg - png - pnm - raw - sgi - tga - tiff Default value is 'bmp'.
width
Image width. Default value is 1920.
create
my $suffix = $image->create($path);
Create image.
Returns scalar value of supported file type.
my $type = $image->type($type);
Set/Get image type.
Returns actual type of image.
new(): From Class::Utils::set_params(): Unknown parameter '%s'. create(): Cannot write file to '$path'.", Error, %s Image type '%s' doesn't supported. type(): Image type '%s' doesn't supported.
use strict; use warnings; use File::Temp qw(tempfile); use Image::Checkerboard; # Temporary file. my (undef, $temp) = tempfile(); # Object. my $obj = Image::Checkerboard->new; # Create image. my $type = $obj->create($temp); # Print out type. print $type."\n"; # Unlink file. unlink $temp; # Output: # bmp
Class::Utils, Error::Pure, Imager, Imager::Fill, List::MoreUtils.
Perl class for creating random image.
https://github.com/michal-josef-spacek/Image-Checkerboard.
Michal Josef Špaček mailto:skim@cpan.org
http://skim.cz
© 2012-2020 Michal Josef Špaček
BSD 2-Clause License
0.05
To install Image::Checkerboard, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Image::Checkerboard
CPAN shell
perl -MCPAN -e shell install Image::Checkerboard
For more information on module installation, please visit the detailed CPAN module installation guide.