Skip to main content
ExLibris
ExLibris Dev

How to change thumbnail size in Digitool

Overview

Thumbnails of image and PDF files are displayed on the resource discovery results page in Brief & Full view. It is possible to change the size of the thumbnail image as displayed on the results page (default 109x109 pixels), or the actual resolution of the jpg thumbnail file (default 150x150 pixels)

In Resource Discovery Brief/Full View

The display size of thumbnails in Resource Discovery is set  in dtl_start

At the terminal type:

 

>dtle (aliased to cd $dtle_root)

>vi dtl_start

 

Edit this section with the desired values:

#      general thumbnail settings

 

       setenv www_thumbnail_height         109

       setenv www_thumbnail_width          109

 

#

 

This sets the Maximum width/height of the pixels on the web page. (109x109 pixels by default).

 

To enable changes run Reload Repository Configuration. (Please be sure to make a backup copy of the file before editing)

To change the size of the actual thumbnail jpg files

This is set in repository_stream_handler.xml

At the terminal type:

 

>j_conf (aliased to cd $jdtlh_conf)

>vi repository_stream_handler.xml

 

In section: <stream_handler_utils>

 

For JPG

<stream_handler_util name="jpg_thumbnail" type="external_program" worker="run_jpg_thumbnail" script="true" params_pattern="-resize 150x150 '$1' '$2'">

                        <event_details event_type="Thumbnail Creation" event_details="Making a thumbnail from an image file" software_used="JMagick" />


For TIFF

<stream_handler_util name="tiff_thumbnail" type="external_program" worker="run_jpg_thumbnail" script="true" params_pattern="-resize 150x150 '$1[0]' '$2'">

                        <event_details event_type="Thumbnail Creation" event_details="Making a thumbnail from an tiff file" software_used="JMagick" />

                </stream_handler_util>

 

For JP2

<stream_handler_util name="jp2_thumbnail" type="external_program" worker="run_j2kdriver_thmb" script="true" params_pattern="'$1' -resize 150x150 '$2'">

                        <event_details event_type="Thumbnail Creation" event_details="Making a thumbnail from jp2 file" software_used="J2k-thumbnailserver" />

                </stream_handler_util>

 

For PDF

 <stream_handler_util name="pdf_thumbnail" type="external_program" worker="run_pdf_thumbnail" script="true" params_pattern="-resize 150x150 '$1[0]' '$2'">

                        <event_details event_type="Thumbnail Creation" event_details="Making a thumbnail from a pdf file" software_used="convert" />

                </stream_handler_util>

 

Change the -resize parameter to the desired value (default 150x150 pixels).

 

Run "Reload Repository Configuration" to make the changes come into effect.

Note:

The thumbnail generation preserves the aspect ratio of the original image.

If the image is wider than taller, then the width of the thumbnail will be 150 pixels.

If the image is taller than wider, then the height of the thumbnail will be 150 pixels.

//doorbell.io feedback widged