A library, command-line script and website for generating placeholder images. See ima.gs for the online version that uses this code.
Perl library, available from CPAN. Comes with a command-line script, used like so:
placeholder --background-color=999 400x300 > test.png
To install this, you will need to be running perl (at least 5.10), and to
install it either using the standard cpan
command, or better yet cpanm
like so:
cpanm --sudo Image::Placeholder
If you want to run your own installation of this:
- inside your corporate firewall so as not to leak HTTP_REFERER values out into the internet
- within a fort or other structure without internet access
- on your laptop
- as another competitor in the highly lucrative online placeholder market
you will need to be running perl (at least 5.10), and to install a bunch of modules from cpan. I'd recommend using cpanm, like so:
cpanm --sudo \
Modern::Perl \
GD \
Plack \
Plack::Middleware::Expires \
Moose \
MooseX::FollowPBP \
MooseX::Method::Signatures
(Download the cpanm script to your server and run it as perl cpanm)
Installation notes for ubuntu You might need to install gd:
sudo apt-get -y install libgd2-xpm-dev build-essential
... and IO:All
cpanm -S -v IO::All
Install plack, follow these instructions: http://advent.plackperl.org/2009/12/day-1-getting-plack.html
Once those are installed, clone this repository, cd
into it and run the
command:
plackup -Ilib placeholder.psgi
which will run it on port 5000.
Check the Plack website for more information on the various ways of deploying Plack powered websites.