public interface RenditionMaker
Modifier and Type | Method and Description |
---|---|
RenditionTemplate |
createThumbnailTemplate(Asset asset,
int width,
int height,
boolean center)
Defines a template for a standard DAM PNG thumbnail rendition.
|
RenditionTemplate |
createWebRenditionTemplate(Asset asset,
int width,
int height,
int quality,
String mimeType,
String[] mimeTypesToKeep)
Defines a template for a standard DAM web enabled rendition.
|
List<Rendition> |
generateRenditions(Asset asset,
RenditionTemplate... templates)
Generates or updates multiple renditions for the given asset based on the given templates.
|
RenditionTemplate createThumbnailTemplate(Asset asset, int width, int height, boolean center)
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.
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 thumbnailheight
- target height of the thumbnailcenter
- true
if the thumbnail should have the exact target size
and the resized image would be centered with transparent whitespace around itRenditionTemplate createWebRenditionTemplate(Asset asset, int width, int height, int quality, String mimeType, String[] mimeTypesToKeep)
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.
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 renditionheight
- target height of the web renditionquality
- for jpegs, the jpeg quality from 0 to 100; for gifs, the number of colors in the palette
from 0 to 256mimeType
- 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 ignoredList<Rendition> generateRenditions(Asset asset, RenditionTemplate... templates)
asset
- asset for which to create or update renditionstemplates
- a vararg list of rendition templates"Copyright © 2006 - 2015 Adobe Systems Incorporated. All Rights Reserved"