Package com.day.cq.dam.commons.handler
Class StandardImageHandler
java.lang.Object
com.day.cq.dam.commons.handler.AbstractAssetHandler
com.day.cq.dam.commons.handler.StandardImageHandler
- All Implemented Interfaces:
AssetHandler
The
StandardImageHandler supports currently following image types: - gif
- png
- photoshop
- jpeg
- tiff
- bmp
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringMime typestatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class com.day.cq.dam.commons.handler.AbstractAssetHandler
PROPERTY_DEACTIVATED_MIME_TYPES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionextractMetadata(Asset asset) This method is used by theExtractMetadataProcessas part of the DAM Update Asset workflow during import or update of an asset.String[]This method returns the mime types a particularAssetHandlersupports.Methods inherited from class com.day.cq.dam.commons.handler.AbstractAssetHandler
canHandleSubAssets, createThumbnails, createThumbnails, createThumbnails, exportAsset, processRelated, processSubAssets
-
Field Details
-
CONFIG_LARGE_FILE_THRESHOLD
- See Also:
-
CONFIG_LARGE_COMMENT_THRESHOLD
- See Also:
-
METADATA_IGNORE_LIST
- See Also:
-
GIF_MIMETYPE
Mime type- See Also:
-
PNG1_MIMETYPE
- See Also:
-
PNG2_MIMETYPE
- See Also:
-
JPEG_MIMETYPE
- See Also:
-
PJPEG_MIMETYPE
- See Also:
-
TIFF_MIMETYPE
- See Also:
-
TIFF1_MIMETYPE
- See Also:
-
BMP1_MIMETYPE
- See Also:
-
BMP2_MIMETYPE
- See Also:
-
RAW1_MIMETYPE
- See Also:
-
RAW2_MIMETYPE
- See Also:
-
RAW3_MIMETYPE
- See Also:
-
RAW4_MIMETYPE
- See Also:
-
RAW5_MIMETYPE
- See Also:
-
RAW6_MIMETYPE
- See Also:
-
RAW7_MIMETYPE
- See Also:
-
RAW8_MIMETYPE
- See Also:
-
RAW9_MIMETYPE
- See Also:
-
RAW10_MIMETYPE
- See Also:
-
RAW11_MIMETYPE
- See Also:
-
RAW12_MIMETYPE
- See Also:
-
RAW13_MIMETYPE
- See Also:
-
RAW14_MIMETYPE
- See Also:
-
RAW15_MIMETYPE
- See Also:
-
RAW16_MIMETYPE
- See Also:
-
RAW17_MIMETYPE
- See Also:
-
RAW18_MIMETYPE
- See Also:
-
RAW19_MIMETYPE
- See Also:
-
RAW20_MIMETYPE
- See Also:
-
RAW21_MIMETYPE
- See Also:
-
RAW22_MIMETYPE
- See Also:
-
RAW23_MIMETYPE
- See Also:
-
DNG_MIMETYPE
- See Also:
-
-
Constructor Details
-
StandardImageHandler
public StandardImageHandler()
-
-
Method Details
-
getMimeTypes
Description copied from interface:AssetHandlerThis method returns the mime types a particularAssetHandlersupports.- Returns:
- mime type, e.g. image/jpg
- See Also:
-
extractMetadata
Description copied from interface:AssetHandlerThis method is used by theExtractMetadataProcessas part of the DAM Update Asset workflow during import or update of an asset. Implementations must return anExtractedMetadataobject, which may be empty if no metadata is extracted, or contains the metadata values extracted from the binary being imported/updated at the time. TheExtractMetadataProcesswill later save the metadata contained inExtractedMetadatato 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
Nodeof type nt:file holding the binary content or the DAM Asset node (type dam:Asset), for which its original rendition would be retrieved.- Parameters:
asset- TheAsset, from whose original binary metadata will extracted.- Returns:
- The extracted metadata.
-
getImage
This method retrieves the graphical representation of anAssets givenRendition. For images theBufferedImageof the original image is returned, for other formats the first page is retrieved asBufferedImage- Specified by:
getImagein interfaceAssetHandler- Overrides:
getImagein classAbstractAssetHandler- Parameters:
rendition- The rendition for which to retrieve its graphical representation.- Returns:
BufferedImageif a graphical representation exists, otherwisenull- Throws:
IOException- in case an error is thrown while fetching the buffered image
-
getImage
This method retrieves the graphical representation of anAssets givenRendition. For images theBufferedImageof the original image is returned, for other formats the first page is retrieved asBufferedImage.If
maxDimensionis 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.- Specified by:
getImagein interfaceAssetHandler- Overrides:
getImagein classAbstractAssetHandler- Parameters:
rendition- The rendition for which to retrieve its graphical representation.maxDimension- optional constraint for the maximal dimension of the image.- Returns:
BufferedImageif a graphical representation exists, otherwisenull- Throws:
IOException- in case an error is thrown while fetching the buffered image
-