Plugin that allows perlbal to serve palette altered images
This documentation refers to \*(C`Perlbal::Plugin::Palimg\*(C' that ships with Perlbal 1.50
Palimg is a perlbal plugin that allows you to modify \*(C`GIF\*(C' and \*(C`PNG\*(C' on the fly. Put the images you want to be able to modify into the \*(C`DOCROOT/palimg/\*(C' directory. You modify them by adding \*(C`/pSPEC\*(C' to the end of the url, where \s-1SPEC\s0 is one of the below defined commands (gradient, tint, etc).
To configure your Perlbal installation to use Palimg you'll need to \*(C`LOAD\*(C' the plugin then add a service parameter to a \*(C`web_server\*(C' service to activate it.
Example \*(C`perlbal.conf\*(C':
LOAD palimg CREATE SERVICE palex SET listen = ${ip:eth0}:80 SET role = web_server SET plugins = palimg SET docroot = /usr/share/doc/ SET dirindexing = 0 ENABLE palex
You can change the gradient of the image by adding \*(C`/pg0011111164ffffff\*(C' to the end of the url. 00 is the index where the gradient starts and 111111 is the color (in hex) of the beginning of the gradient. 64 is the index of the end of the gradient and \*(C`ffffff\*(C' is the color of the end of the gradient. Note that all colors specified in hex should be lowercase.
Example:
http://192.168.0.1/palimg/logo.gif/pg01aaaaaa99cccccc
You can tint the image by adding \*(C`/pt000000aaaaaa\*(C' to the end of the url. 000000 should be replaced with the color to tint towards. \*(C`aaaaaa\*(C' is optional and defines the \*(L"dark\*(R" tint color. Both colors should be specified as lowercase hex numbers.
Example:
http://192.168.0.1/palimg/logo.gif/pt1c1c1c22dba1
You can specify a palette to replace the palette of the image. Do this by adding up to six sets of seven hex lowercase numbers prefixed with \*(C`/p\*(C' to the end of the \s-1URL\s0.
Example:
http://192.168.0.1/palimg/logo.gif/p01234567890abcfffffffcccccccddddddd
There are no known bugs in this module.
Please report problems to the Perlbal mailing list, http://groups.google.com/group/perlbal
Patches are welcome.
Brad Fitzpatrick <[email protected]> Mark Smith <[email protected]>
Artistic/GPLv2, at your choosing.
Copyright 2004, Danga Interactive Copyright 2005-2007, Six Apart Ltd