Simon Matthews > Image-BioChrome-1.16 > Apache::BioChrome

Download:
Image-BioChrome-1.16.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 1.04   Source  

NAME ^

Apache::BioChrome - Apache handler for Image::BioChrome to colorise gif files based on information provided in the url

SYNOPSIS ^

    #httpd.conf
    PerlTransHandler Apache::BioChrome

    # anywhere you can configure a location
    <Location /biochrome>
        PerlSetVar biochrome_cache /tmp/biochrome
        PerlSetVar biochrome_source /usr/www/images/biochrome
    </Location>

DESCRIPTION ^

This module is designed to allow the automatic building of gif images that make up an interface by using the Image::BioChrome module to replace values in the global color table. It takes the color information from the URL and creates a copy of the gif file from the source directory in the location specified by the biochrome cache variable. This file is then returned by apache using the standard delivery method.

I developed this module because we produce lots of web sites where a high proportion of the site interface is common. But where images need to be in a different color for specific sites.

Once you have the handler setup as above you can call it in two different ways:

/biochrome/alpha_ff0000_0000ff/picure.gif

Will take the file picture.gif and do an alpha map replacement using the colors ff0000 and 0000ff as the two ends of the spectrum. The use of alpha maps should be familiar to anyone who uses photoshop or gimp a lot. Essentially the colors are taken from the url and used as follows. The first color will be the background color of the image. The second color will be applied to those pixels where the red channel is turned on.

/biochrome/ff0000_00ff00_0000ff_ccffff/picure.gif

Will take the file and replace colors in the global color table with those provided on the url. In the example whatever color was the first in the color table will be replaced with red. Colors are replaced until we run out of replacements or positions in the color table to replace.

For further details of how to create your graphics and examples of using BioChrome see the examples directory or the Image::BioChrome documentation.

AUTHOR ^

Simon Matthews <sam@tt2.org>

REVISION ^

$Revision: 1.4 $

COPYRIGHT ^

Copyright (C) 2003 Simon Matthews. All Rights Reserved.

This module is free software; you can distribute it and/or modify it under the same terms as Perl itself.

SEE ALSO ^

See Image::BioChrome for further information on using BioChrome.

syntax highlighting: