Image thumbnails and metadata extraction
The repository server contains an (optional) component that can perform image thumbnailing, extraction of metadata (width, height and, for JPEG, arbitrary Exif fields), and automatic rotation of JPEG images as indicated in the Exif data. This component is registered as a "pre-save-hook", this is a component which gets called before a document is saved, and which can modify the content of the to-be-saved document.
For further reference, we will call this component the image hook.
The image hook can be configured to react on multiple document types, and for each document type it is possible to specify what needs to be done:
- generate a thumbnail: size and name of the part to store the thumbnail in can be configured.
- generate a preview image (somewhat larger then a thumbnail): ditto config as for thumbnails
- assign the width and the height of the image to fields of your choice (these need to be of type long)
- a mapping of Exif metadata fields to fields in the Daisy document. The mapping can bind different data types, and can bind either the raw value or a formatted value. For example, the field "Exposure Program" can be bound either as the numeric value '2' or as the string "Program normal".
By default, the image hook is configured to handle the Image document type as defined by the Daisy Wiki.
The configuration of the image hook can be adjusted via the myconfig.xml configuration file of the repository server.
The image hook will only perform its work if the part containing the original image data changed, or if any of the to-be extracted information is missing in the target document. Therefore, if for some reason you want to trigger the image hook to redo its work, you need to make sure one of these conditions is true.



There are no comments.