Class DefaultImageThumbnailPolicyFilter

    • Constructor Detail

      • DefaultImageThumbnailPolicyFilter

        public DefaultImageThumbnailPolicyFilter()
    • Method Detail

      • createThumbnail

        public boolean createThumbnail​(FileDocument doc,
                                       java.io.File dest,
                                       ImageFormat format,
                                       int maxWidth,
                                       int maxHeight,
                                       java.lang.String background,
                                       boolean square,
                                       boolean done)
        Description copied from interface: ThumbnailPolicyFilter
        This method is a hook called by Thumbnail tag to generate a thumbnail of the given FileDocument.
        Specified by:
        createThumbnail in interface ThumbnailPolicyFilter
        Specified by:
        createThumbnail in class AbstractThumbnailPolicyFilterImpl
        Parameters:
        doc - FileDocument of which to create a thumbnail
        dest - destination file (the thumbnail to generate)
        format - the format of the file to generate as requested by the ThumbnailTag
        maxWidth - the maximum width of the thumbnail to generate
        maxHeight - the maximum height of the thumbnail to generate
        background - the background color (eg "FFFFFF") if sets the image dimension will be set maxWidth and maxHeight
        square - set to true to crop image into a square using the specified width during thumbnail creation.
        done - the global plugin createThumbnail() status
        Returns:
        true on success, or false if the thumbnail could not be created
        See Also:
        ThumbnailPolicyFilter.createThumbnail(FileDocument, File, ImageFormat, int, int, String, boolean, boolean)