Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: minor formatting cleanup

ImageMagic Media Filters

Table of Contents
minLevel2
outlinetrue
stylenone

Overview

The ImageMagick Media Filters provide consistent, high quality thumbnails for image bitstreams and PDF bitstreams.

...

  • Install ImageMagick on your server
  • If you wish to generate PDF thumbnails, install Ghostscript on your server
  • The ImageMagick and Ghostscript executables should be accessible from the same directory (e.g. /usr/bin)

DSpace Configuration

In the filter.plugins section your dspace.cfg file, uncomment the ImageMagick media filter definition.

Code Block

...

   

...

 ImageMagick Image Thumbnail, ImageMagick PDF Thumbnail, \

This will activate the following settings which are already present in dspace.cfg

Code Block
    org.dspace.app.mediafilter.ImageMagickImageThumbnailFilter = ImageMagick Image Thumbnail, \

...


    org.dspace.app.mediafilter.ImageMagickPdfThumbnailFilter = ImageMagick PDF Thumbnail

These media filters contain the following configuration properties

...

The following properties are used to define the dimensions of the generated thumbnails.

Code Block
# maximum width and height of generated thumbnails
thumbnail.maxwidth 

...

 = 80
thumbnail.maxheight = 80

Conversion Utility Path

The following property provides a path to the ImageMagick and GhostScript utilities.

Code Block

...

org.dspace.app.mediafilter.ImageMagickThumbnailFilter.ProcessStarter = /usr/bin

Overwriting Existing Thumbnails

The The ImageMagick media filters can differentiate thumbnails created by the DSpace default thumbnail generator and thumbnails that were manually uploaded by a user.  The media filter reads the bitstream description field to make this determination.  A regular expression can be provided to define the set of thumbnails that should be overwritten by the ImageMagick thumbnail generator. Thumbnail descriptions matching this pattern will be overwritten even if the -f option is not passed to the filter media process.

Code Block

...

org.dspace.app.mediafilter.ImageMagickThumbnailFilter.replaceRegex = ^Generated Thumbnail$

The ImageMagick media filter will use the bitstream description field to identify bitstreams that it has created using the following setting.  Bitstreams containing this label will be overwritten only if the -f filter is applied.

Code Block

...

org.dspace.app.mediafilter.ImageMagickThumbnailFilter.bitstreamDescription = IM Thumbnail

Thumbnail descriptions that do not match either of the patterns listed above are presumed to be manually uploaded thumbnails.  These thumbnails will not be replaced even if the -f option is passed to the filter media process.

...