Go to the first, previous, next, last section, table of contents.


Thumbnail Caching

Enable Caching

Variable:
$opt_cache
Argument:
--cache

Enable thumbnail caching. This is good for a 5X reduction in processing time when a single image is added or removed from a directory since thumbnails are cached in reduced form.

As an added benefit, WebMagick can share its cache with John Bradley's xv image manipulation program (Visual Schnauzer feature) if configuration values are set as follows:

$opt_cacheformat= 'P7';
$opt_cachegeom  = 80x60;
$opt_cachedir   = '.xvpics';

Sharing the cache with xv is only feasable if all of the images being cached are compatable with xv (ImageMagick supports many more formats than xv). A further drawback of sharing the cache with xv is that xv is limited to thumbnails with a geometry of 80x60 which may be small for your tastes (I prefer larger).

Cache Directory

Variable:
$opt_cachedir=dirspec
Argument:
--cachedir dirspec

Specify subdirectory name to cache thumbnails in (default `.cache').

Cache Thumbnail Format

Variable:
$opt_cacheformat=imageformat
Argument:
--cacheformat imageformat

Specify the format that cached thumbnails are saved in. Can be any format that ImageMagick knows how to read and write. The default is 'JPEG' which works well for photorealistic images.

Cache Thumbnail Geometry

Variable:
$opt_cachegeom=geometry
Argument:
--cachegeom geometry

Specifies the geometry specification for cached thumbnails. The default is to use the value specified by $opt_thumbgeometry (see section Thumbnail Geometry). If a smaller value is used, there will be more unused space around the montaged thumbnails. Use of a larger value than the thubnail geometry is to be avoided because the cached thumbnail will still have to be reduced for the montage, costing both time and thumbnail quality.

Cache Minimum Image Size

Variable:
$opt_cachemin=minsize
Argument:
--cachemin minsize

Specifies the original Image size (in total pixels) over which caching will be used. For images smaller than this size, WebMagick will use the original image in the Montage and no thumbnail will be cached. The default value is 60,000 which is equivalent to a 300 x 200 image.

Selecting a value for this option is a judgement call based on space vs time. If a small value is selected, the initial run will be slower and more disk space will be consumed by thumbnails. However, subsequent updates should be faster since more thumbnails are already reduced. If a large value is selected, then less disk space will be consumed, the first pass will be faster, and subsequent passes will be slower.


Go to the first, previous, next, last section, table of contents.