@Service public class StandardImageHandler extends AbstractAssetHandler
StandardImageHandler supports currently following image types: PROPERTY_DEACTIVATED_MIME_TYPES| Constructor and Description |
|---|
StandardImageHandler() |
| Modifier and Type | Method and Description |
|---|---|
ExtractedMetadata |
extractMetadata(Asset asset)
This method is used by the
com.day.cq.dam.core.process.ExtractMetadataProcess as part of the DAM
Update Asset workflow during import or update of an asset. |
BufferedImage |
getImage(Rendition rendition)
|
BufferedImage |
getImage(Rendition rendition,
Dimension maxDimension)
|
String[] |
getMimeTypes()
This method returns the mime types a particular
AssetHandler supports. |
canHandleSubAssets, createThumbnails, createThumbnails, createThumbnails, exportAsset, processRelated, processSubAssetspublic static final String CONFIG_LARGE_FILE_THRESHOLD
public static final String CONFIG_LARGE_COMMENT_THRESHOLD
public static final String METADATA_IGNORE_LIST
public static final String GIF_MIMETYPE
public static final String PNG1_MIMETYPE
public static final String PNG2_MIMETYPE
public static final String JPEG_MIMETYPE
public static final String PJPEG_MIMETYPE
public static final String TIFF_MIMETYPE
public static final String TIFF1_MIMETYPE
public static final String BMP1_MIMETYPE
public static final String BMP2_MIMETYPE
public static final String RAW1_MIMETYPE
public static final String RAW2_MIMETYPE
public static final String RAW3_MIMETYPE
public static final String RAW4_MIMETYPE
public static final String RAW5_MIMETYPE
public static final String RAW6_MIMETYPE
public static final String RAW7_MIMETYPE
public static final String RAW8_MIMETYPE
public static final String RAW9_MIMETYPE
public static final String RAW10_MIMETYPE
public static final String RAW11_MIMETYPE
public static final String RAW12_MIMETYPE
public static final String RAW13_MIMETYPE
public static final String RAW14_MIMETYPE
public static final String RAW15_MIMETYPE
public static final String RAW16_MIMETYPE
public static final String RAW17_MIMETYPE
public static final String RAW18_MIMETYPE
public static final String RAW19_MIMETYPE
public static final String RAW20_MIMETYPE
public static final String RAW21_MIMETYPE
public static final String RAW22_MIMETYPE
public static final String RAW23_MIMETYPE
public static final String DNG_MIMETYPE
public String[] getMimeTypes()
AssetHandlerAssetHandler supports.AssetHandler.getMimeTypes()public ExtractedMetadata extractMetadata(Asset asset)
AssetHandlercom.day.cq.dam.core.process.ExtractMetadataProcess as part of the DAM
Update Asset workflow during import or update of an asset. Implementations must return an ExtractedMetadata object, which may be empty if no metadata is extracted, or
contains the metadata values extracted from the binary being imported/updated at the time. The
ExtractMetadataProcess will later save the metadata contained in ExtractedMetadata to
the asset's metadata node (e.g. /content/dam/geometrixx/banners/banner-mono.png/jcr:content/metadata).
Implementations are free to decide which and how many metadata values are extracted.
The method argument represents the Node of type nt:file holding the binary content or
the DAM Asset node (type dam:Asset), for which its original rendition would be retrieved.
asset - The Asset, from whose original binary metadata will extracted.public BufferedImage getImage(Rendition rendition) throws IOException
Assets given Rendition. For images the
BufferedImage of the original image is returned, for other formats the first page is retrieved as
BufferedImagegetImage in interface AssetHandlergetImage in class AbstractAssetHandlerrendition - The rendition for which to retrieve its graphical representation.BufferedImage if a graphical representation exists, otherwise nullIOException - in case an error is thrown while fetching the buffered imagepublic BufferedImage getImage(Rendition rendition, Dimension maxDimension) throws IOException
Assets given Rendition. For images the
BufferedImage of the original image is returned, for other formats the first page is retrieved as
BufferedImage.
If maxDimension is given, the handler should return an
image where no dimension extends the given value. This can be used to reduce
the memory footprint of large buffered images if the full resolution is not needed.
getImage in interface AssetHandlergetImage in class AbstractAssetHandlerrendition - The rendition for which to retrieve its graphical representation.maxDimension - optional constraint for the maximal dimension of the image.BufferedImage if a graphical representation exists, otherwise nullIOException - in case an error is thrown while fetching the buffered imageCopyright © 2010 - 2020 Adobe. All Rights Reserved