Imager::Tiler - package to aggregate images into a single tiled image via Imager |
Imager::Tiler - package to aggregate images into a single tiled image via Imager
use Imager::Tiler qw(tile); # # use computed coordinates for layout, and retrieve the # coordinates for later use (as imported method) # my ($img, @coords) = tile( Images => [ 'chart1.png', 'chart2.png', 'chart3.png', 'chart4.png'], Background => 'lgray', Center => 1, VEdgeMargin => 10, HEdgeMargin => 10, VTileMargin => 5, HTileMargin => 5); # # use explicit coordinates for layout (as class method) # my $explimg = Imager::Tiler->tile( Images => [ 'chart1.png', 'chart2.png', 'chart3.png', 'chart4.png'], Background => 'lgray', Width => 500, Height => 500, Coordinates => [ 10, 10, 120, 10, 10, 120, 120, 120 ]);
Creates a new tiled image from a set of input images. Various arguments may be specified to position individual images, or the default behaviors can be used to create an reasonable placement to fill a square image.
Only a single method is provided:
Returns a Imager::Image object of the images specified in %args, positioned according to the directives in %arg. In array context, also returns the list of upper left corner coordinates of each image, so e.g., an application can adjust the image map coordinate values for individual images.
Valid %args are:
$color
(optional)white lyellow lpurple lbrown lgray yellow purple dbrown gray dyellow dpurple transparent dgray lgreen lorange black green orange lblue dgreen pink blue lred dpink dblue red marine gold dred cyan
Default is white.
$boolean
(optional)\@coords
(optional)If Coordinates is specified, then Height and Width must also be specified, and any margin values are ignored.
$pixels
(optional)$format
(optional)$pixels
(optional)$height
(optional)$pixels
(optional)\@images
(required)$count
(optional)boolean
(optional)$pixels
(optional)$pixels
(optional)$pixels
(optional)$width
(optional)
Imager
Fork this module on GitHub: https://github.com/zoffixznet/Imager-Tiler
To report bugs or request features, please use https://github.com/zoffixznet/Imager-Tiler/issues
If you can't access GitHub, you can email your request
to bug-imager-tiler at rt.cpan.org
Zoffix Znet (zoffix 'at' cpan.org)
Dean Arnold mailto:darnold@presicient.com
Copyright(C)
2007, 2008, Dean Arnold, Presicient Corp., USA.
Permission is granted to use, copy, modify, and redistribute this software under the terms of the Academic Free License version 3.0, as specified at the Open Source Initiative website http://www.opensource.org/licenses/afl-3.0.php.
Imager::Tiler - package to aggregate images into a single tiled image via Imager |