App::Dthumb - Generate thumbnail index for a set of images
use App::Dthumb; use Getopt::Long qw(:config no_ignore_case); my $opt = {}; GetOptions( $opt, qw{ help|h size|d=i spacing|s=f no-lightbox|L no-names|n quality|q=i version|v }, ); my $dthumb = App::Dthumb->new($opt); $dthumb->run();
This manual documents App::Dthumb version 0.2
Returns a new App::Dthumb object. As you can see in the SYNOPSIS, $conf is designed so that it can be directly fed by Getopt::Long.
Valid hash keys are:
Set base directory for image reading, data creation etc.
Default: . (current working directory)
Set name of the html index file
Default: index.xhtml
Include and use javascript lightbox code
Default: true
If true, unconditionally recreate all thumbnails.
Default: false
Maximum image size in pixels, either width or height (depending on image orientation)
Default: 200
Spacing between image boxes. 1.0 means each box is exactly as wide as the maximum image width (see size), 1.1 means slightly larger, et cetera
Default: 1.1
Show image name below thumbnail
Thumbnail image quality
Default: 75
Read in a list of all image files in the current directory and all files in .thumbs which do not have a corresponding full-size image.
Makes sure the .thumbs directory exists.
Also, if lightbox is enabled (which is the default), creates the .dthumb directory and fills it with all required files.
Unlink all no longer required thumbnails (as previously found by read_directories).
Returns an array of all image files found by read_directories.
Append the necessary lines for $file to the HTML.
Load $file and save a resized version in .thumbs/$file. Skips thumbnail generation if the thumbnail already exists and has a more recent mtime than the original file.
Write the cached HTML data to index.xhtml.
App::Dthumb::Data
Image::Imlib2
Copyright (C) 2009-2011 by Daniel Friesel <derf@chaosdorf.de>
0. You just DO WHAT THE FUCK YOU WANT TO.
To install App::Dthumb, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::Dthumb
CPAN shell
perl -MCPAN -e shell install App::Dthumb
For more information on module installation, please visit the detailed CPAN module installation guide.