Class CreateThumbnailProcess

  • All Implemented Interfaces:
    WorkflowProcess

    @Service
    @Property(name="process.label",
              value="Create Thumbnail")
    public class CreateThumbnailProcess
    extends AbstractAssetWorkflowProcess
    The CreateThumbnailProcess is called in a Workflow process step. This process will create one or more Thumbnails for the Asset to be procesed. The Thumbnail generation is delegated to the appropriate AssetHandler. The thumbails Dimensions are given as the Workflow Process arguments
    Each argument is considered as one thumbnail configuration. The configuration has to be enclosed in squared brackets ([]) The configuration consists of a number for the width, the height in pixel and an optional flag that indicates if the image should be centered.
    These values are seperated by a colon character (:).
    Dimension:
    The thumbnail from an image will be created by resizeing according the thumbnail configuration. The ascpect ratio is respected and the image will have at most the dimension given by the configuration.
    Centering:
    If the center flag is set to true, the thumbnail image will have exactly the size given by the configuraiton. If the resized image is smaller it will be centered within the thumbnail.

    Example with the following Workflow step arguments:

        [70:70],
        [80:100:true]
     

    The Process creates two PNG images one of the size of 70x70 pixel and one 80x100 where the result is centred