public class StandardImageHandler extends AbstractAssetHandler
StandardImageHandler
supports currently following image types: Modifier and Type | Field and Description |
---|---|
static String |
BMP1_MIMETYPE |
static String |
BMP2_MIMETYPE |
static String |
DNG_MIMETYPE |
static String |
GIF_MIMETYPE
Mime type
|
static String |
JPEG_MIMETYPE |
static String |
PJPEG_MIMETYPE |
static String |
PNG1_MIMETYPE |
static String |
PNG2_MIMETYPE |
static String |
RAW1_MIMETYPE |
static String |
RAW10_MIMETYPE |
static String |
RAW11_MIMETYPE |
static String |
RAW12_MIMETYPE |
static String |
RAW13_MIMETYPE |
static String |
RAW14_MIMETYPE |
static String |
RAW15_MIMETYPE |
static String |
RAW16_MIMETYPE |
static String |
RAW17_MIMETYPE |
static String |
RAW18_MIMETYPE |
static String |
RAW19_MIMETYPE |
static String |
RAW2_MIMETYPE |
static String |
RAW20_MIMETYPE |
static String |
RAW21_MIMETYPE |
static String |
RAW3_MIMETYPE |
static String |
RAW4_MIMETYPE |
static String |
RAW5_MIMETYPE |
static String |
RAW6_MIMETYPE |
static String |
RAW7_MIMETYPE |
static String |
RAW8_MIMETYPE |
static String |
RAW9_MIMETYPE |
static String |
TIFF_MIMETYPE |
static 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. |
BufferedImage |
getImage(Rendition rendition)
This method retrieves the graphical representation of the given file.
|
BufferedImage |
getImage(Rendition rendition,
Dimension maxDimension)
|
String[] |
getMimeTypes()
This method returns the mime types a particular
AssetHandler supports. |
canHandleSubAssets, createThumbnails, createThumbnails, createThumbnails, createThumbnails, createThumbnailsExt, exportAsset, processRelated, processSubAssets, processSubAssets
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 DNG_MIMETYPE
public String[] getMimeTypes()
AssetHandler
AssetHandler
supports.AssetHandler.getMimeTypes()
public ExtractedMetadata extractMetadata(Asset asset)
AbstractAssetHandler
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.extractMetadata
in interface AssetHandler
extractMetadata
in class AbstractAssetHandler
asset
- the file nodeAsset.getMetadata()
,
Asset.getMetadata(String)
,
Asset.getMetadataValue(String)
public BufferedImage getImage(Rendition rendition) throws IOException
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
- to retrieve the image representationBufferedImage
if a graphical representaion exists, otherwise null
IOException
- in case an error is thrown while fetching the buffered imagepublic BufferedImage getImage(Rendition rendition, Dimension maxDimension) throws 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
IOException
- in case an error is thrown while fetching the buffered image"Copyright © 2006 - 2015 Adobe Systems Incorporated. All Rights Reserved"