Image::Placeholder - generate images for use as placeholders
use Image::Placeholder; my $image = Image::Placeholder->new( width => 300, height => 250, background_colour => 'ccc', line_colour => 'none', font => 'Gill Sans', text => 'IAB MRec', ); print $image->generate();
The new() method accepts a hash of options to control the size and appearance of the generated image.
The colour that the background of the image should be painted. Accepts a colour value (see "Valid colour values"). Defaults to ddd.
The height of the image in pixels. Defaults to the same as
The colour that the border and cross lines should be painted in. Accepts either a colour value or
none to suppress them. Defaults to 444.
A text alternative to supplying
height separately; of the form '300x250'.
The text to use across the image. Defaults to the size of the image, expressed in the form '300x250'.
The colour that the text should be painted in. Accepts either a colour value or
none to suppress the text. Defaults to 36f.
Makes the background transparent.
The width of the image in pixels. Defaults to 300.
Colour values are specified as the red, green and blue channels in hexadecimal, where
00 is the least and
FF is the most. So black is
000000 and white is
CSS-style 3-character shorthand is also accepted where the three channels are repeating characters. So black is also
000 and white
FFF. All three values have to be repeating, so a value such as
080808 cannot be shorted.
command-line generator that uses this module.
hosted version of this module.
Mark Norman Francis, firstname.lastname@example.org.
Copyright 2010 Mark Norman Francis.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.