Interface RenditionMaker


public interface RenditionMaker
Service interface for creating standard thumbnail, web and other renditions for DAM assets.
Since:
6.0
  • Method Details

    • generateRenditions

      List<Rendition> generateRenditions(Asset asset, RenditionTemplate... templates)
      Generates or updates multiple renditions for the given asset based on the given templates. All successfully generated renditions will be returned. In case one generation failed, it will not be part of the returned list.
      Parameters:
      asset - asset for which to create or update renditions
      templates - a vararg list of rendition templates
      Returns:
      a list with all renditions that were successfully created or updated
    • createThumbnailTemplate

      RenditionTemplate createThumbnailTemplate(Asset asset, int width, int height, boolean center)
      Defines a template for a standard DAM PNG thumbnail rendition.

      The aspect ratio of the assets base image will be preserved. Depending on orientation, either width or height of the target size will be smaller.

      If center=true, the rendition image will have the exact given target size and the resized image, which still keeps the original aspect ratio, will be centered with possible transparent whitespace around it to fill up to the target size.

      Parameters:
      asset - asset that is the base for the thumbnail (could be different from the asset on which the template will be applied)
      width - target width of the thumbnail
      height - target height of the thumbnail
      center - true if the thumbnail should have the exact target size and the resized image would be centered with transparent whitespace around it
      Returns:
      a rendition template
    • createWebRenditionTemplate

      RenditionTemplate createWebRenditionTemplate(Asset asset, int width, int height, int quality, String mimeType, String[] mimeTypesToKeep)
      Defines a template for a standard DAM web enabled rendition.

      The aspect ratio of the assets base image will be preserved. Depending on orientation, either width or height of the target size will be smaller.

      Parameters:
      asset - asset that is the base for the web rendition (could be different from the asset on which the template will be applied)
      width - target width of the web rendition
      height - target height of the web rendition
      quality - for jpegs, the jpeg quality from 0 to 100; for gifs, the number of colors in the palette from 0 to 256
      mimeType - mime type of the new web rendition unless asset mime type is in 'mimeTypesToKeep'
      mimeTypesToKeep - list of asset mime types that will be used for the rendition as well, in which case the parameter 'mimeType' will be ignored
      Returns:
      a rendition template
    • createThumbnailTemplate

      RenditionTemplate createThumbnailTemplate(Rendition rendition, int width, int height, boolean center)
      Defines a template for a standard DAM PNG thumbnail rendition from a given rendition.

      The aspect ratio of the assets base image will be preserved. Depending on orientation, either width or height of the target size will be smaller.

      If center=true, the rendition image will have the exact given target size and the resized image, which still keeps the original aspect ratio, will be centered with possible transparent whitespace around it to fill up to the target size.

      Parameters:
      rendition - rendition that is the base for the thumbnail. It could be any rendition of the asset.
      width - target width of the thumbnail
      height - target height of the thumbnail
      center - true if the thumbnail should have the exact target size and the resized image would be centered with transparent whitespace around it
      Returns:
      a rendition template
      Since:
      6.1
    • createWebRenditionTemplate

      RenditionTemplate createWebRenditionTemplate(Rendition rendition, int width, int height, int quality, String mimeType, String[] mimeTypesToKeep)
      Defines a template for a standard DAM web enabled rendition from a given rendition. The aspect ratio of the assets base image will be preserved. Depending on orientation, either width or height of the target size will be smaller.
      Parameters:
      rendition - rendition that is the base for the web rendition. It could be any rendition of the asset.
      width - target width of the web rendition
      height - target height of the web rendition
      quality - for jpegs, the jpeg quality from 0 to 100; for gifs, the number of colors in the palette from 0 to 256
      mimeType - mime type of the new web rendition unless asset mime type is in 'mimeTypesToKeep'
      mimeTypesToKeep - list of asset mime types that will be used for the rendition as well, in which case the parameter 'mimeType' will be ignored
      Returns:
      a rendition template
      Since:
      6.1
    • createRenditionTemplate

      RenditionTemplate createRenditionTemplate(Asset asset, String renditionName, int width, int height, int quality, String mimeType, String[] mimeTypesToKeep)
      Defines a template for a rendition with the given name. The aspect ratio of the assets base image will be preserved. Depending on orientation, either width or height of the target size will be smaller.
      Parameters:
      asset - asset that is the base for the thumbnail. It could be any rendition of the asset.
      renditionName - rendition name to be used.
      width - target width of the web rendition
      height - target height of the web rendition
      quality - for jpegs, the jpeg quality from 0 to 100; for gifs, the number of colors in the palette from 0 to 256
      mimeType - mime type of the new web rendition unless asset mime type is in 'mimeTypesToKeep'
      mimeTypesToKeep - list of asset mime types that will be used for the rendition as well, in which case the parameter 'mimeType' will be ignored
      Returns:
      a rendition template