Apache::Gallery(3pm) | User Contributed Perl Documentation | Apache::Gallery(3pm) |
Apache::Gallery - mod_perl handler to create an image gallery
See the INSTALL file in the distribution for installation instructions.
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 ways and a custom copyright image can be added to all the images without modifying the original.
In your httpd.conf you set the global options for the gallery. You can also override each of the options in .htaccess files in your gallery directories.
The options are set in the httpd.conf/.htaccess file using the syntax: PerlSetVar OptionName 'value'
Example: PerlSetVar GalleryCacheDir '/var/cache/www/'
This behavior is default but can be disabled by setting GalleryAutoRotate to 0.
No default value, this option is required.
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'
The default is '640 800 1024 1600'
Defaults to '100x75'
Defaults to '0'.
Optional.
Set to 1 or 0, default is 0
Set to 1 or 0, default is 0
Defaults to '0' (false).
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 parse the 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 available to your templates. You can place them anywhere you want.
The default is '\.(jpe?g|png|tiff?|ppm)$'
The default is '\.(mpe?g|avi|mov|asf|wmv|doc|mp3|mp4|ogg|pdf|rtf|wav|dlt|txt|html?|csv|eps)$'
Example:
PerlSetVar GalleryTTFDir '/usr/share/fonts/'
PerlSetVar GalleryTTFFile 'verdanab.ttf'
Example:
PerlSetVar GalleryTTFSize '10'
Example:
PerlSetVar GalleryCopyrightText '(c) Michael Legart'
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'
r,g,b,a - for examples, see GalleryCopyrightColor
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 in Imlib2 1.1.0.
Examples:
Quality at 50:
PerlSetVar GalleryQuality '50'
If your camera does not support this, you can rotate the images manually, This can also be used to override the rotate information from a camera that supports that. You can also disable this behavior with the GalleryAutoRotate option.
To use this functionality you have to create file with the name of the picture you want rotated appended 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 would create a file in the same directory called "Picture1234.jpg.rotate" with the number 1 inside of it.
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 of the folder, but can be changed by creating a file <directory>.folder with the visible name of the folder.
Similarly, the visible name of any file is by default identical to the name of the file, but can be changed by creating a file <file>.file with the visible name of the file.
It is also possible to set GalleryCommentExifKey to the name of an EXIF field containing the comment, e.g. ImageDescription. The EXIF comment is overridden by the .comment file if it exists.
Michael Legart <michael@legart.dk>
Copyright (C) 2001-2011 Michael Legart <michael@legart.dk>
Templates designed by Thomas Kjaer <tk@lnx.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 to Thomas Kjaer for templates and design of http://apachegallery.dk Thanks to Thomas Eibner and other for patches. (See the Changes file)
perl, mod_perl, Image::Imlib2, CGI::FastTemplate, Image::Info, and Image::Size.
2022-12-02 | perl v5.36.0 |