SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG

BotDetect - Real-Time Bot Detection API
 
 

MAN page from PLD Apache-Gallery-1.0-0.RC3.3.i686.rpm

Apache::Gallery

Section: User Contributed Perl Documentation (3)
Updated: 2006-06-08
Index 

NAME

Apache::Gallery - mod_perl handler to create an image gallery 

SYNOPSIS

See the INSTALL file in the distribution for installation instructions. 

DESCRIPTION

Apache::Gallery creates an thumbnail index of each directory and allows viewing pictures in different resolutions. Pictures are resized on the fly and cached. The gallery can be configured and customized in many waysand a custom copyright image can be added to all the images withoutmodifying the original. 

CONFIGURATION

In your httpd.conf you set the global options for the gallery. You canalso override each of the options in .htaccess files in your gallerydirectories.

The options are set in the httpd.conf/.htaccess file using the syntax:PerlSetVar OptionName 'value'

Example: PerlSetVar GalleryCacheDir '/var/cache/Apache-Gallery/'

GalleryAutoRotate
Some cameras, like the Canon G3, can detect the orientation of a the pictures you take and will save this information in the 'Orientation' EXIF field. Apache::Gallery will then automaticallyrotate your images.

This behavior is default but can be disabled by setting GalleryAutoRotateto 0.

GalleryCacheDir
Directory where Apache::Gallery should create its cache with scaledpictures. The default is /var/cache/Apache-Gallery/ . Here, a directoryfor each virtualhost or location will be created automaticly. Makesure your webserver has write access to the CacheDir.
GalleryTemplateDir
Full path to the directory where you placed the templates. This optioncan be used both in your global configuration and in .htaccess files,this way you can have different layouts in different parts of your gallery.

No default value, this option is required.

GalleryInfo
With this option you can define which EXIF information you would liketo present from the image. The format is: '<MyName => KeyInEXIF, MyOtherName => OtherKeyInEXIF'

Examples of keys: ShutterSpeedValue, ApertureValue, SubjectDistance,and Camera

You can view all the keys from the EXIF header using this perl-oneliner:

perl "-e" 'use Data::Dumper; use Image::Info qw(image_info); print Dumper(image_info(shift));' filename.jpg

Default is: 'Picture Taken => DateTimeOriginal, Flash => Flash'

GallerySizes
Defines which widths images can be scaled to. Images cannot bescaled to other widths than the ones you define with this option.

The default is '640 800 1024 1600'

GalleryThumbnailSize
Defines the width and height of the thumbnail images.

Defaults to '100x75'

GalleryThumbnailSizeLS
If set to '1', GalleryThumbnailSize is the long and the short side ofthe thumbnail image instead of the width and height.

Defaults to '0'.

GalleryCopyrightImage
Image you want to blend into your images in the lower rightcorner. This could be a transparent png saying ``copyrightmy name 2001''.

Optional.

GalleryWrapNavigation
Make the navigation in the picture view wrap around (So Nextat the end displays the first picture, etc.)

Set to 1 or 0, default is 0

GalleryAllowOriginal
Allow the user to download the Original picture withoutresizing or putting the CopyrightImage on it.

Set to 1 or 0, default is 0

GallerySlideshowIntervals
With this option you can configure which intervals can be selected fora slideshow. The default is '3 5 10 15 30'
GallerySortBy
Instead of the default filename ordering you can sort by anystat attribute. For example size, atime, mtime, ctime.
GalleryDirSortBy
Set this variable to sort directories differently than other items,can be set to size, atime, mtime and ctime; setting any other valuewill revert to sorting by name.
GalleryMemoize
Cache EXIF data using Memoize - this will make Apache::Gallery fasterwhen many people access the same images, but it will also cache EXIFdata until the current Apache child dies.
GalleryUseFileDate
Set this option to 1 to make A::G show the files timestampinstead of the EXIF value for ``Picture taken''.
GallerySelectionMode
Enable the selection mode. Select images with checkboxes andget a list of filenames.
GalleryEXIFMode
You can choose how Apache::Gallery should display EXIF infofrom your images.

The default setting is 'namevalue'. This setting will make Apache::Gallery print out the names and values of the EXIF values you configure with GalleryInfo. The information will be parsed into $INFO in pictureinfo.tpl.

You can also set it to 'values' which will make A::G parsethe configured values into the var $EXIFVALUES as 'value | value | value'

If you set this option to 'variables' the items you configure in GalleryInfo will be available to your templates as $EXIF_<KEYNAME> (in all uppercase). That means that with the default setting ``Picture Taken => DateTimeOriginal, Flash => Flash'' you will have the variables $EXIF_DATETIMEORIGINAL and $EXIF_FLASH avilable to your templates. You can place themanywhere you want.

GalleryRootPath
Change the location of gallery root. The default is ""
GalleryRootText
Change the name that appears as the root element in the menu. Thedefault is ``root:''
GalleryMaxThumbnailsPerPage
This options controls how many thumbnails should be displayed in a page. It requires $BROWSELINKS to be in the index.tpl template file.
GalleryImgFile
Pattern matching the files you want Apache::Gallery to view in theindex as thumbnails.

The default is '\.(jpe?g|png|tiff?|ppm)$'

GalleryDocFile
Pattern matching the files you want Apache::Gallery to view in the indexas normal files. All other filetypes will still be served by Apache::Gallerybut are not visible in the index.

The default is '\.(mpe?g|avi|mov|asf|wmv|doc|mp3|ogg|pdf|rtf|wav|dlt|html?|csv|eps)$'

GalleryTTFDir
To use the GalleryCopyrightText feature you must set this option to thedirectory where your True Type fonts are stored. No default is set.

Example:

        PerlSetVar      GalleryTTFDir '/usr/share/fonts/'
GalleryTTFFile
To use the GalleryCopyrightText feature this option must be set to thename of the True Type font you wish to use. Example:

        PerlSetVar      GalleryTTFFile 'verdanab.ttf'
GalleryTTFSize
Configure the size of the CopyrightText that will be inserted as copyright notice in the corner of your pictures.

Example:

        PerlSetVar      GalleryTTFSize '10'
GalleryCopyrightText
The text that will be inserted as copyright notice.

Example:

        PerlSetVar      GalleryCopyrightText '(c) Michael Legart'
GalleryCopyrightColor
The text color of your copyright notice.

Examples:

White:
        PerlSetVar      GalleryCopyrightColor '255,255,255,255'

Black:
        PerlSetVar      GalleryCopyrightColor '0,0,0,255'

Red:
        PerlSetVar      GalleryCopyrightColor '255,0,0,255'

Green:
        PerlSetVar      GalleryCopyrightColor '0,255,0,255'

Blue:
        PerlSetVar      GalleryCopyrightColor '0,0,255,255'

Transparent orange:
        PerlSetVar      GalleryCopyrightColor '255,127,0,127'

GalleryCopyrightBackgroundColor
The background-color of a GalleryCopyrightText

r,g,b,a - for examples, see GalleryCopyrightColor

GalleryQuality
The quality (1-100) of scaled images

This setting affects the quality of the scaled images.Set this to a low number to reduce the size of the scaled images.Remember to clear out your cache if you change this setting.Quality seems to default to 75, at least in the jpeg and png loader code inImlib2 1.1.0.

Examples:

Quality at 50:
        PerlSetVar      GalleryQuality '50'

GalleryUnderscoresToSpaces
Set this option to 1 to convert underscores to spaces in the listingof directory names.
 

FEATURES

Rotate images
Some cameras, like the Canon G3, detects the orientation of a pictureand adds this info to the EXIF header. Apache::Gallery detects thisand automaticly rotates images with this info.

If your camera does not support this, you can rotate the images manually, This can also be used to override the rotate informationfrom a camera that supports that. You can also disable this behaviorwith the GalleryAutoRotate option.

To use this functionality you have to create file with the name of the picture you want rotated appened with ``.rotate''. The file should include a number where these numbers are supported:

        "1", rotates clockwise by 90 degree        "2", rotates clockwise by 180 degrees        "3", rotates clockwise by 270 degrees

So if we want to rotate ``Picture1234.jpg'' 90 degrees clockwise we wouldcreate a file in the same directory called ``Picture1234.jpg.rotate'' withthe number 1 inside of it.

Comments
To include comments for a directory you create a <directory>.commentfile where the first line can contain ``TITLE: New title'' whichwill be the title of the page, and a comment on the following lines.To include comments for each picture you create files called picture.jpg.comment where the first line can contain ``TITLE: Newtitle'' which will be the title of the page, and a comment on thefollowing lines.

Example:

        TITLE: This is the new title of the page        And this is the comment.<br>        And this is line two of the comment.

The visible name of the folder is by default identical to the name ofthe folder, but can be changed by creating a file <directory>.folderwith the visible name of the folder.

 

DEPENDENCIES

Perl 5
Apache with mod_perl
URI::Escape
Image::Info
Image::Size
Text::Template
Image::Imlib2
X11 libraries (ie, XFree86)
Imlib2 Remember the -dev package when using rpm, deb or other package formats!
 

AUTHOR

Michael Legart <michaelAATTlegart.dk> 

COPYRIGHT AND LICENSE

Copyright (C) 2001-2005 Michael Legart <michaelAATTlegart.dk>

Templates designed by Thomas Kjaer <tkAATTlnx.dk>

Apache::Gallery is free software and is released under the Artistic License.See http://www.perl.com/language/misc/Artistic.html for details.

The video icons are from the GNOME project. http://www.gnome.org/ 

THANKS

Thanks to Thomas Kjaer for templates and design of http://apachegallery.dkThanks to Thomas Eibner and other for patches. (See the Changes file) 

SEE ALSO

perl, mod_perl, Image::Imlib2, CGI::FastTemplate,Image::Info, and Image::Size.


 

Index

NAME
SYNOPSIS
DESCRIPTION
CONFIGURATION
FEATURES
DEPENDENCIES
AUTHOR
COPYRIGHT AND LICENSE
THANKS
SEE ALSO

This document was created byman2html,using the manual pages.
 
ICM Bot detect detector