| | 295 | |
| | 296 | __END__ |
| | 297 | |
| | 298 | =head1 NAME |
| | 299 | |
| | 300 | Perlbal::Plugin::Palimg - plugin that allows Perlbal to serve palette altered images |
| | 301 | |
| | 302 | =head1 VERSION |
| | 303 | |
| | 304 | This documentation refers to C<Perlbal::Plugin::Palimg> that ships with Perlbal 1.50 |
| | 305 | |
| | 306 | =head1 DESCRIPTION |
| | 307 | |
| | 308 | Palimg is a perlbal plugin that allows you to modify C<GIF> and C<PNG> on the fly. Put the images you want to be able to modify into the C<DOCROOT/palimg/> directory. You modify them by adding C</pSPEC> to the end of the url, where SPEC is one of the below defined commands (gradient, tint, etc). |
| | 309 | |
| | 310 | =head1 CONFIGURING PERLBAL |
| | 311 | |
| | 312 | To configure your Perlbal installation to use Palimg you'll need to C<LOAD> the plugin then add a service parameter to a C<web_server> service to activate it. |
| | 313 | |
| | 314 | Example C<perlbal.conf>: |
| | 315 | |
| | 316 | LOAD palimg |
| | 317 | |
| | 318 | CREATE SERVICE palex |
| | 319 | SET listen = ${ip:eth0}:80 |
| | 320 | SET role = web_server |
| | 321 | SET plugins = palimg |
| | 322 | SET docroot = /usr/share/doc/ |
| | 323 | SET dirindexing = 0 |
| | 324 | ENABLE palex |
| | 325 | |
| | 326 | =head1 GRADIENTS |
| | 327 | |
| | 328 | You can change the gradient of the image by adding C</pg0011111164ffffff> to the end of the url. C<00> is the index where the gradient starts and C<111111> is the color (in hex) of the begining of the gradient. C<64> is the index of the end of the gradient and C<ffffff> is the color of the end of the gradient. Note that all colors specified in hex should be lowercase. |
| | 329 | |
| | 330 | Example: |
| | 331 | |
| | 332 | http://192.168.0.1/palimg/logo.gif/pg01aaaaaa99cccccc |
| | 333 | |
| | 334 | =head1 TINTING |
| | 335 | |
| | 336 | You can tint the image by adding C</pt000000aaaaaa> to the end of the url. C<000000> should be replaced with the color to tint towards. C<aaaaaa> is optional and defines the "dark" tint color. Both colors should be specified as lowercase hex numbers. |
| | 337 | |
| | 338 | Example: |
| | 339 | |
| | 340 | http://192.168.0.1/palimg/logo.gif/pt1c1c1c22dba1 |
| | 341 | |
| | 342 | =head1 PALETTE REPLACEMENT |
| | 343 | |
| | 344 | 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> to the end of the URL. |
| | 345 | |
| | 346 | Example: |
| | 347 | |
| | 348 | http://192.168.0.1/palimg/logo.gif/p01234567890abcfffffffcccccccddddddd |
| | 349 | |
| | 350 | =head1 BUGS AND LIMITATIONS |
| | 351 | |
| | 352 | There are no known bugs in this module. |
| | 353 | |
| | 354 | Please report problems to the Perlbal mailing list, http://lists.danga.com/mailman/listinfo/perlbal/ |
| | 355 | |
| | 356 | Patches are welcome. |
| | 357 | |
| | 358 | =head1 AUTHORS |
| | 359 | |
| | 360 | Brad Fitzpatrick <brad@danga.com> |
| | 361 | Mark Smith <junior@danga.com> |
| | 362 | |
| | 363 | =head1 LICENSE AND COPYRIGHT |
| | 364 | |
| | 365 | Artistic/GPLv2, at your choosing. |
| | 366 | |
| | 367 | Copyright 2004, Danga Interactive |
| | 368 | Copyright 2005-2006, Six Apart Ltd |