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-names|n quality|q=i version|v }, ); my $dthumb = App::Dthumb->new($opt); $dthumb->run;
This manual documents App::Dthumb version 0.2
App::Dthumb does the backend work for dthumb(1).
Returns a new App::Dthumb object. As you can see in the SYNOPSIS, %conf is designed so that it can be directly passed from 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.html
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
Default: true
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.html.
None yet.
To be determined.
Copyright (C) 2009-2016 by Daniel Friesel <derf@chaosdorf.de>
0. You just DO WHAT THE FUCK YOU WANT TO.