Apache::ImageShoehorn - mod_perl wrapper for Image::Shoehorn
PerlSetVar ScaledDir /path/to/some/dir
PerlSetVar SetScaleSmall 25%
PerlSetVar SetScaleMedium 50%
PerlSetVar SetScaleLarge 75%
PerlSetVar SetScaleThumb x50
PerlSetVar SetValid png
PerlSetVar Convert On
PerlSetVar ScaleAllOnCleanup Off
# Do something with HTML files here
# This image would actually be converted and
# sent to the browser as a PNG file. Woot!
Apache mod_perl wrapper for Image::Shoehorn.
A path on the filesystem where the handler will save images that have been scaled
Remember, this directory needs to be writable by whatever user is running the http daemon.
Define the names and dimensions of scaled images. name will be converted to lower-case and compared with the scale CGI query parameter. If no matching config directive is located, the handler will return DECLINED.
If there are multiple SetScale directives then they will be processed, if necessary, during the handler's cleanup stage.
If a scaled image already exists, it will not be rescaled until the lastmodified time for the source file is greater than that of the scaled version.
Valid dimensions are identical as those listed in Image::Shoehorn.
Define one or more file types that are considered valid for sending to the browser, notwithstanding any issues of scaling, "as-is".
If an image fails a validity test, then the image will be be converted using the first type defined by the SetValid configs that the package (read: Image::Magick) can understand.
Toggle setting for scaling all size definitions for an image during the cleanup phase of a request. Default is "On".
This package does not support all of the options available to the Image::Shoehorn constructor. They will likely be added in later releases. The current list of unsupported configuration options is :
July 07, 2002
Aaron Straup Cope
Copyright (c) 2002 Aaron Straup Cope. All Rights Reserved.
This is free software, you may use it and distribute it under the same terms as Perl itself.
To install Image::Shoehorn, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.