Apache::BioChrome 1.16 reviewDownload
Apache::BioChrome is an Apache handler for Image::BioChrome to colorize gif files based on information provided in the url. SYNOPS
Apache::BioChrome is an Apache handler for Image::BioChrome to colorize gif files based on information provided in the url.
# anywhere you can configure a location
< Location /biochrome >
PerlSetVar biochrome_cache /tmp/biochrome
PerlSetVar biochrome_source /usr/www/images/biochrome
< /Location >
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:
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.
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.
Apache::BioChrome 1.16 search tags