.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" ======================================================================== .\" .IX Title "Apache::Gallery 3pm" .TH Apache::Gallery 3pm "2017-11-02" "perl v5.26.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Apache::Gallery \- mod_perl handler to create an image gallery .SH "SYNOPSIS" .IX Header "SYNOPSIS" See the \s-1INSTALL\s0 file in the distribution for installation instructions. .SH "DESCRIPTION" .IX Header "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 ways and a custom copyright image can be added to all the images without modifying the original. .SH "CONFIGURATION" .IX Header "CONFIGURATION" 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. .PP The options are set in the httpd.conf/.htaccess file using the syntax: \&\fBPerlSetVar OptionName 'value'\fR .PP Example: \fBPerlSetVar GalleryCacheDir '/var/cache/www/'\fR .IP "\fBGalleryAutoRotate\fR" 4 .IX Item "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' \s-1EXIF\s0 field. Apache::Gallery will then automatically rotate your images. .Sp This behavior is default but can be disabled by setting GalleryAutoRotate to 0. .IP "\fBGalleryCacheDir\fR" 4 .IX Item "GalleryCacheDir" Directory where Apache::Gallery should create its cache with scaled pictures. The default is /var/cache/www/ . Here, a directory for each virtualhost or location will be created automatically. Make sure your webserver has write access to the CacheDir. .IP "\fBGalleryTemplateDir\fR" 4 .IX Item "GalleryTemplateDir" Full path to the directory where you placed the templates. This option can be used both in your global configuration and in .htaccess files, this way you can have different layouts in different parts of your gallery. .Sp No default value, this option is required. .IP "\fBGalleryInfo\fR" 4 .IX Item "GalleryInfo" With this option you can define which \s-1EXIF\s0 information you would like to present from the image. The format is: ' KeyInEXIF, MyOtherName => OtherKeyInEXIF' .Sp Examples of keys: \fBShutterSpeedValue\fR, \fBApertureValue\fR, \fBSubjectDistance\fR, and \fBCamera\fR .Sp You can view all the keys from the \s-1EXIF\s0 header using this perl-oneliner: .Sp perl \f(CW\*(C`\-e\*(C'\fR 'use Data::Dumper; use Image::Info qw(image_info); print Dumper(image_info(shift));' filename.jpg .Sp Default is: 'Picture Taken => DateTimeOriginal, Flash => Flash' .IP "\fBGallerySizes\fR" 4 .IX Item "GallerySizes" Defines which widths images can be scaled to. Images cannot be scaled to other widths than the ones you define with this option. .Sp The default is '640 800 1024 1600' .IP "\fBGalleryThumbnailSize\fR" 4 .IX Item "GalleryThumbnailSize" Defines the width and height of the thumbnail images. .Sp Defaults to '100x75' .IP "\fBGalleryThumbnailSizeLS\fR" 4 .IX Item "GalleryThumbnailSizeLS" If set to '1', \fBGalleryThumbnailSize\fR is the long and the short side of the thumbnail image instead of the width and height. .Sp Defaults to '0'. .IP "\fBGalleryCopyrightImage\fR" 4 .IX Item "GalleryCopyrightImage" Image you want to blend into your images in the lower right corner. This could be a transparent png saying \*(L"copyright my name 2001\*(R". .Sp Optional. .IP "\fBGalleryWrapNavigation\fR" 4 .IX Item "GalleryWrapNavigation" Make the navigation in the picture view wrap around (So Next at the end displays the first picture, etc.) .Sp Set to 1 or 0, default is 0 .IP "\fBGalleryAllowOriginal\fR" 4 .IX Item "GalleryAllowOriginal" Allow the user to download the Original picture without resizing or putting the CopyrightImage on it. .Sp Set to 1 or 0, default is 0 .IP "\fBGalleryAllowThumbOnly\fR" 4 .IX Item "GalleryAllowThumbOnly" If true, \fBGalleryAllowThumbOnly\fR allows fooimg.jpg?thumbonly urls to output the thumbnail of the image. This is useful when including images in a blog (or similar). .Sp Defaults to '0' (false). .IP "\fBGallerySlideshowIntervals\fR" 4 .IX Item "GallerySlideshowIntervals" With this option you can configure which intervals can be selected for a slideshow. The default is '3 5 10 15 30' .IP "\fBGallerySortBy\fR" 4 .IX Item "GallerySortBy" Instead of the default filename ordering you can sort by any stat attribute. For example size, atime, mtime, ctime. .IP "\fBGalleryDirSortBy\fR" 4 .IX Item "GalleryDirSortBy" Set this variable to sort directories differently than other items, can be set to size, atime, mtime and ctime; setting any other value will revert to sorting by name. .IP "\fBGalleryMemoize\fR" 4 .IX Item "GalleryMemoize" Cache \s-1EXIF\s0 data using Memoize \- this will make Apache::Gallery faster when many people access the same images, but it will also cache \s-1EXIF\s0 data until the current Apache child dies. .IP "\fBGalleryUseFileDate\fR" 4 .IX Item "GalleryUseFileDate" Set this option to 1 to make A::G show the files timestamp instead of the \s-1EXIF\s0 value for \*(L"Picture taken\*(R". .IP "\fBGallerySelectionMode\fR" 4 .IX Item "GallerySelectionMode" Enable the selection mode. Select images with checkboxes and get a list of filenames. .IP "\fBGalleryEXIFMode\fR" 4 .IX Item "GalleryEXIFMode" You can choose how Apache::Gallery should display \s-1EXIF\s0 info from your images. .Sp The default setting is 'namevalue'. This setting will make Apache::Gallery print out the names and values of the \s-1EXIF\s0 values you configure with GalleryInfo. The information will be parsed into \&\f(CW$INFO\fR in pictureinfo.tpl. .Sp You can also set it to 'values' which will make A::G parse the configured values into the var \f(CW$EXIFVALUES\fR as 'value | value | value' .Sp If you set this option to 'variables' the items you configure in GalleryInfo will be available to your templates as \f(CW$EXIF_\fR<\s-1KEYNAME\s0> (in all uppercase). That means that with the default setting \*(L"Picture Taken => DateTimeOriginal, Flash => Flash\*(R" you will have the variables \f(CW$EXIF_DATETIMEORIGINAL\fR and \&\f(CW$EXIF_FLASH\fR available to your templates. You can place them anywhere you want. .IP "\fBGalleryRootPath\fR" 4 .IX Item "GalleryRootPath" Change the location of gallery root. The default is "" .IP "\fBGalleryRootText\fR" 4 .IX Item "GalleryRootText" Change the name that appears as the root element in the menu. The default is \*(L"root:\*(R" .IP "\fBGalleryMaxThumbnailsPerPage\fR" 4 .IX Item "GalleryMaxThumbnailsPerPage" This options controls how many thumbnails should be displayed in a page. It requires \f(CW$BROWSELINKS\fR to be in the index.tpl template file. .IP "\fBGalleryImgFile\fR" 4 .IX Item "GalleryImgFile" Pattern matching the files you want Apache::Gallery to view in the index as thumbnails. .Sp The default is '\e.(jpe?g|png|tiff?|ppm)$' .IP "\fBGalleryDocFile\fR" 4 .IX Item "GalleryDocFile" Pattern matching the files you want Apache::Gallery to view in the index as normal files. All other filetypes will still be served by Apache::Gallery but are not visible in the index. .Sp The default is '\e.(mpe?g|avi|mov|asf|wmv|doc|mp3|mp4|ogg|pdf|rtf|wav|dlt|txt|html?|csv|eps)$' .IP "\fBGalleryTTFDir\fR" 4 .IX Item "GalleryTTFDir" To use the GalleryCopyrightText feature you must set this option to the directory where your True Type fonts are stored. No default is set. .Sp Example: .Sp .Vb 1 \& PerlSetVar GalleryTTFDir \*(Aq/usr/share/fonts/\*(Aq .Ve .IP "\fBGalleryTTFFile\fR" 4 .IX Item "GalleryTTFFile" To use the GalleryCopyrightText feature this option must be set to the name of the True Type font you wish to use. Example: .Sp .Vb 1 \& PerlSetVar GalleryTTFFile \*(Aqverdanab.ttf\*(Aq .Ve .IP "\fBGalleryTTFSize\fR" 4 .IX Item "GalleryTTFSize" Configure the size of the CopyrightText that will be inserted as copyright notice in the corner of your pictures. .Sp Example: .Sp .Vb 1 \& PerlSetVar GalleryTTFSize \*(Aq10\*(Aq .Ve .IP "\fBGalleryCopyrightText\fR" 4 .IX Item "GalleryCopyrightText" The text that will be inserted as copyright notice. .Sp Example: .Sp .Vb 1 \& PerlSetVar GalleryCopyrightText \*(Aq(c) Michael Legart\*(Aq .Ve .IP "\fBGalleryCopyrightColor\fR" 4 .IX Item "GalleryCopyrightColor" The text color of your copyright notice. .Sp Examples: .Sp White: PerlSetVar GalleryCopyrightColor '255,255,255,255' .Sp Black: PerlSetVar GalleryCopyrightColor '0,0,0,255' .Sp Red: PerlSetVar GalleryCopyrightColor '255,0,0,255' .Sp Green: PerlSetVar GalleryCopyrightColor '0,255,0,255' .Sp Blue: PerlSetVar GalleryCopyrightColor '0,0,255,255' .Sp Transparent orange: PerlSetVar GalleryCopyrightColor '255,127,0,127' .IP "\fBGalleryCopyrightBackgroundColor\fR" 4 .IX Item "GalleryCopyrightBackgroundColor" The background-color of a GalleryCopyrightText .Sp r,g,b,a \- for examples, see GalleryCopyrightColor .IP "\fBGalleryQuality\fR" 4 .IX Item "GalleryQuality" The quality (1\-100) of scaled images .Sp 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. .Sp Examples: .Sp Quality at 50: PerlSetVar GalleryQuality '50' .IP "\fBGalleryUnderscoresToSpaces\fR" 4 .IX Item "GalleryUnderscoresToSpaces" Set this option to 1 to convert underscores to spaces in the listing of directory and file names, as well as in the alt attribute for \s-1HTML\s0 tags. .IP "\fBGalleryCommentExifKey\fR" 4 .IX Item "GalleryCommentExifKey" Set this option to e.g. ImageDescription to use this field as comments for images. .IP "\fBGalleryEnableMediaRss\fR" 4 .IX Item "GalleryEnableMediaRss" Set this option to 1 to enable generation of a media \s-1RSS\s0 feed. This can be used e.g. together with the PicLens plugin from http://piclens.com .SH "FEATURES" .IX Header "FEATURES" .IP "\fBRotate images\fR" 4 .IX Item "Rotate images" Some cameras, like the Canon G3, detects the orientation of a picture and adds this info to the \s-1EXIF\s0 header. Apache::Gallery detects this and automatically rotates images with this info. .Sp 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. .Sp To use this functionality you have to create file with the name of the picture you want rotated appended with \*(L".rotate\*(R". The file should include a number where these numbers are supported: .Sp .Vb 3 \& "1", rotates clockwise by 90 degree \& "2", rotates clockwise by 180 degrees \& "3", rotates clockwise by 270 degrees .Ve .Sp So if we want to rotate \*(L"Picture1234.jpg\*(R" 90 degrees clockwise we would create a file in the same directory called \*(L"Picture1234.jpg.rotate\*(R" with the number 1 inside of it. .IP "\fBIgnore directories/files\fR" 4 .IX Item "Ignore directories/files" To ignore a directory or a file (of any kind, not only images) you create a .ignore file. .IP "\fBComments\fR" 4 .IX Item "Comments" To include comments for a directory you create a .comment file where the first line can contain \*(L"\s-1TITLE:\s0 New title\*(R" which will 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 \*(L"\s-1TITLE:\s0 New title\*(R" which will be the title of the page, and a comment on the following lines. .Sp Example: .Sp .Vb 3 \& TITLE: This is the new title of the page \& And this is the comment.
\& And this is line two of the comment. .Ve .Sp The visible name of the folder is by default identical to the name of the folder, but can be changed by creating a file .folder with the visible name of the folder. .Sp 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 with the visible name of the file. .Sp It is also possible to set GalleryCommentExifKey to the name of an \s-1EXIF\s0 field containing the comment, e.g. ImageDescription. The \s-1EXIF\s0 comment is overridden by the .comment file if it exists. .SH "DEPENDENCIES" .IX Header "DEPENDENCIES" .IP "\fBPerl 5\fR" 4 .IX Item "Perl 5" .PD 0 .IP "\fBApache with mod_perl\fR" 4 .IX Item "Apache with mod_perl" .IP "\fBURI::Escape\fR" 4 .IX Item "URI::Escape" .IP "\fBImage::Info\fR" 4 .IX Item "Image::Info" .IP "\fBImage::Size\fR" 4 .IX Item "Image::Size" .IP "\fBText::Template\fR" 4 .IX Item "Text::Template" .IP "\fBImage::Imlib2\fR" 4 .IX Item "Image::Imlib2" .IP "\fBX11 libraries\fR (ie, XFree86)" 4 .IX Item "X11 libraries (ie, XFree86)" .IP "\fBImlib2\fR Remember the \-dev package when using rpm, deb or other package formats!" 4 .IX Item "Imlib2 Remember the -dev package when using rpm, deb or other package formats!" .PD .SH "AUTHOR" .IX Header "AUTHOR" Michael Legart .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" Copyright (C) 2001\-2011 Michael Legart .PP Templates designed by Thomas Kjaer .PP Apache::Gallery is free software and is released under the Artistic License. See \fBhttp://www.perl.com/language/misc/Artistic.html\fR for details. .PP The video icons are from the \s-1GNOME\s0 project. \fBhttp://www.gnome.org/\fR .SH "THANKS" .IX Header "THANKS" Thanks to Thomas Kjaer for templates and design of \fBhttp://apachegallery.dk\fR Thanks to Thomas Eibner and other for patches. (See the Changes file) .SH "SEE ALSO" .IX Header "SEE ALSO" perl, mod_perl, Image::Imlib2, CGI::FastTemplate, Image::Info, and Image::Size.