public class StandardImageHandler extends AbstractAssetHandler
StandardImageHandler
supports currently following image types: Modifier and Type | Field and Description |
---|---|
static java.lang.String |
BMP1_MIMETYPE |
static java.lang.String |
BMP2_MIMETYPE |
static java.lang.String |
CONFIG_LARGE_COMMENT_THRESHOLD |
static java.lang.String |
CONFIG_LARGE_FILE_THRESHOLD |
static java.lang.String |
DNG_MIMETYPE |
static java.lang.String |
GIF_MIMETYPE
Mime type
|
static java.lang.String |
JPEG_MIMETYPE |
static java.lang.String |
PJPEG_MIMETYPE |
static java.lang.String |
PNG1_MIMETYPE |
static java.lang.String |
PNG2_MIMETYPE |
static java.lang.String |
RAW1_MIMETYPE |
static java.lang.String |
RAW10_MIMETYPE |
static java.lang.String |
RAW11_MIMETYPE |
static java.lang.String |
RAW12_MIMETYPE |
static java.lang.String |
RAW13_MIMETYPE |
static java.lang.String |
RAW14_MIMETYPE |
static java.lang.String |
RAW15_MIMETYPE |
static java.lang.String |
RAW16_MIMETYPE |
static java.lang.String |
RAW17_MIMETYPE |
static java.lang.String |
RAW18_MIMETYPE |
static java.lang.String |
RAW19_MIMETYPE |
static java.lang.String |
RAW2_MIMETYPE |
static java.lang.String |
RAW20_MIMETYPE |
static java.lang.String |
RAW21_MIMETYPE |
static java.lang.String |
RAW3_MIMETYPE |
static java.lang.String |
RAW4_MIMETYPE |
static java.lang.String |
RAW5_MIMETYPE |
static java.lang.String |
RAW6_MIMETYPE |
static java.lang.String |
RAW7_MIMETYPE |
static java.lang.String |
RAW8_MIMETYPE |
static java.lang.String |
RAW9_MIMETYPE |
static java.lang.String |
TIFF_MIMETYPE |
static java.lang.String |
TIFF1_MIMETYPE |
PROPERTY_DEACTIVATED_MIME_TYPES
Constructor and Description |
---|
StandardImageHandler() |
Modifier and Type | Method and Description |
---|---|
ExtractedMetadata |
extractMetadata(Asset asset)
This method is used by the
ExtractMetadataProcess as part of the DAM
Update Asset workflow during import or update of an asset. |
java.awt.image.BufferedImage |
getImage(Rendition rendition)
|
java.awt.image.BufferedImage |
getImage(Rendition rendition,
java.awt.Dimension maxDimension)
|
java.lang.String[] |
getMimeTypes()
This method returns the mime types a particular
AssetHandler supports. |
canHandleSubAssets, createThumbnails, createThumbnails, createThumbnails, exportAsset, processRelated, processSubAssets
public static final java.lang.String CONFIG_LARGE_FILE_THRESHOLD
public static final java.lang.String CONFIG_LARGE_COMMENT_THRESHOLD
public static final java.lang.String GIF_MIMETYPE
public static final java.lang.String PNG1_MIMETYPE
public static final java.lang.String PNG2_MIMETYPE
public static final java.lang.String JPEG_MIMETYPE
public static final java.lang.String PJPEG_MIMETYPE
public static final java.lang.String TIFF_MIMETYPE
public static final java.lang.String TIFF1_MIMETYPE
public static final java.lang.String BMP1_MIMETYPE
public static final java.lang.String BMP2_MIMETYPE
public static final java.lang.String RAW1_MIMETYPE
public static final java.lang.String RAW2_MIMETYPE
public static final java.lang.String RAW3_MIMETYPE
public static final java.lang.String RAW4_MIMETYPE
public static final java.lang.String RAW5_MIMETYPE
public static final java.lang.String RAW6_MIMETYPE
public static final java.lang.String RAW7_MIMETYPE
public static final java.lang.String RAW8_MIMETYPE
public static final java.lang.String RAW9_MIMETYPE
public static final java.lang.String RAW10_MIMETYPE
public static final java.lang.String RAW11_MIMETYPE
public static final java.lang.String RAW12_MIMETYPE
public static final java.lang.String RAW13_MIMETYPE
public static final java.lang.String RAW14_MIMETYPE
public static final java.lang.String RAW15_MIMETYPE
public static final java.lang.String RAW16_MIMETYPE
public static final java.lang.String RAW17_MIMETYPE
public static final java.lang.String RAW18_MIMETYPE
public static final java.lang.String RAW19_MIMETYPE
public static final java.lang.String RAW20_MIMETYPE
public static final java.lang.String RAW21_MIMETYPE
public static final java.lang.String DNG_MIMETYPE
public java.lang.String[] getMimeTypes()
AssetHandler
AssetHandler
supports.AssetHandler.getMimeTypes()
public ExtractedMetadata extractMetadata(Asset asset)
AssetHandler
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 javax.jcr.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 java.awt.image.BufferedImage getImage(Rendition rendition) throws java.io.IOException
Asset
s given Rendition
. For images the
BufferedImage
of the original image is returned, for other formats the first page is retrieved as
BufferedImage
getImage
in interface AssetHandler
getImage
in class AbstractAssetHandler
rendition
- The rendition for which to retrieve its graphical representation.BufferedImage
if a graphical representation exists, otherwise null
java.io.IOException
- in case an error is thrown while fetching the buffered imagepublic java.awt.image.BufferedImage getImage(Rendition rendition, java.awt.Dimension maxDimension) throws java.io.IOException
Asset
s 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 AssetHandler
getImage
in class AbstractAssetHandler
rendition
- 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 null
java.io.IOException
- in case an error is thrown while fetching the buffered image"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"