DS-2105: Create Thumbnails Using ImageMagick 

Clean version of https://github.com/DSpace/DSpace/pull/597

This code uses ImageMagick and Ghostscript to generate DSpace thumbnails of higher quality than the out-of-the-box capability of DSpace. Ghostscript allows DSpace's media filter to generate thumbnails from PDF bitstreams (similar to the XPDF method mentioned in the DSpace Manual, but with higher quality).

Installation Dependencies

This solution requires ImageMagick and Ghostscript to be installed on the server where DSpace is running. Each of these utilities must exist in DSpace's runtime path. These applications will be run from the command line.

Build Dependencies

This solution adds a build dependency on im4java

Configuration

Changes needed in DSpace configuration file, dspace.cfg:

plugin.named.org.dspace.app.mediafilter.FormatFilter = \
    org.dspace.app.mediafilter.LitImageThumbnailFilter = LIT Image Thumbnail, \
    org.dspace.app.mediafilter.LitPdfThumbnailFilter = LIT PDF Thumbnail, \

filter.org.dspace.app.mediafilter.LitImageThumbnailFilter.inputFormats = BMP, GIF, image/png, JPG, TIFF, JPEG, JPEG 2000
filter.org.dspace.app.mediafilter.LitPdfThumbnailFilter.inputFormats = Adobe PDF

# GU ImageMagick Customizations
org.dspace.app.mediafilter.LitImageMagickThumbnailFilter.ProcessStarter = /usr/bin
org.dspace.app.mediafilter.LitImageMagickThumbnailFilter.ThumbnailWidth = 180
org.dspace.app.mediafilter.LitImageMagickThumbnailFilter.ThumbnailHeight = 120
DSpace has problems interpolating multi-line properties when there are commented-out lines in the middle. So this advice should probably be re-worded (but I noticed it's a problem in master as well, you're just following the wording there).