You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Have an INI option to automatically create thumbnails using ImageMagick and Ghostscript (apt-get install imagemagick ghostscript)
For simplicity, also specify a www-readable directory where thumbnails are created.
The CKAN admin can also optionally specify in the INI file the ImageMagick convert parameters to size the thumbnail. If not specified, default thumbnail will be generated as follows:
convert -thumbnail x300 -background white -alpha remove input_file.pdf[0] output_thumbnail.png
To simplify pulling up the thumbnail in templates, the thumbnail will use the resource ID in the filename - [resource ID]_thumb.png, with [resource ID] being directory-sharded on first two hyphens - e.g. the thumbnail for a PDF with resource ID 9efec242-c83b-46c8-9574-ab5c6e37e11c is stored in /var/lib/ckan/default/thumbnails/9efec242/c83b/46c8-9574-ab5c6e37e11c_thumb.png, assuming the thumbnail directory is set to /var/lib/ckan/default/thumbnails.
The thumbnail will be generated if it doesn't exist when calling can_view. In this way, PDF resources uploaded earlier will have thumbnails as well.
Reopening. This became a requirement for one installation which we implemented. Will be an optional feature that's off by default so existing installations will not have a problem.
Have an INI option to automatically create thumbnails using ImageMagick and Ghostscript (apt-get install imagemagick ghostscript)
For simplicity, also specify a www-readable directory where thumbnails are created.
The CKAN admin can also optionally specify in the INI file the ImageMagick convert parameters to size the thumbnail. If not specified, default thumbnail will be generated as follows:
To simplify pulling up the thumbnail in templates, the thumbnail will use the resource ID in the filename - [resource ID]_thumb.png, with [resource ID] being directory-sharded on first two hyphens - e.g. the thumbnail for a PDF with resource ID 9efec242-c83b-46c8-9574-ab5c6e37e11c is stored in /var/lib/ckan/default/thumbnails/9efec242/c83b/46c8-9574-ab5c6e37e11c_thumb.png, assuming the thumbnail directory is set to /var/lib/ckan/default/thumbnails.
The thumbnail will be generated if it doesn't exist when calling can_view. In this way, PDF resources uploaded earlier will have thumbnails as well.
What do you think of this approach @amercader ?
The text was updated successfully, but these errors were encountered: