Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Minor edits and port ICC profile text from 6x wiki

...

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

...

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 propertiesseveral properties which can be configured.

Thumbnail Dimensions

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

...

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.flatten = false

ICC Profiles

PDFs optimized for physical printing often use the CMYK color space. On the web, however, the de facto color system is sRGB. By default, DSpace's ImageMagick-based thumbnailing system will create thumbnails that use the same color space as the source PDF. Most web browsers are not able to correctly display images that use the CMYK color space, which leads to images with visibly inaccurate colors. Furthermore, the JSPUI currently does not support the display of thumbnails that use the CMYK color space (see DS-2834).

If you are using Ghostscript version 9 or above, it is possible for DSpace to correctly convert images from CMYK to sRGB by providing it with appropriate ICC color profiles to use during thumbnail creation. Default ones are provided by most Ghostscript installations (version 9 or above). The following configuration options tell DSpace where those ICC profiles are located.

Code Block
# org.dspace.app.mediafilter.ImageMagickThumbnailFilter.cmyk_profile = /usr/share/ghostscript/9.18/iccprofiles/default_cmyk.icc
# org.dspace.app.mediafilter.ImageMagickThumbnailFilter.srgb_profile = /usr/share/ghostscript/9.18/iccprofiles/default_rgb.icc

You may need to adjust those paths for your OS or the version of Ghostscript that you have.

Providing ICC profiles to ImageMagick is optional. If these configuration properties are unset, no profiles will be supplied to ImageMagick, and thumbnails produced from PDFs using the CMYK color space will also use CMYK. The transformation from CMYK to RGB is optional, but keep in mind that thumbnails using CMYK will cause problems if you use JSPUI and display thumbnails within browsing and search (see DS-2834).

Additional Customization

The ImageMagick conversion software provides a large number of conversion options.  Subclasses of these media filters could be written to take advantage of the additional conversion properties available in the software.

...