public class ImageRenderingEngine extends AbstractTransformationRenderingEngine
RenditionService
's
"imageRenderingEngine" rendering engine. This action renders a piece of
content in the same MIME type as its source node, having been rescaled as
requested.AbstractTransformationRenderingEngine.TransformationCallable
AbstractRenderingEngine.RenderingContext
Modifier and Type | Field and Description |
---|---|
static String |
NAME |
static String |
PARAM_ALLOW_ENLARGEMENT
This optional
Boolean flag parameter specifies whether image resizing
should produce an enlarged image, based on the resizing parameters and the size
of the original image. |
static String |
PARAM_AUTO_ORIENTATION
This optional
Boolean flag parameter specifies if the engine should
automatically rotate and image based on the EXIF orientation flag. |
static String |
PARAM_COMMAND_OPTIONS
This optional
String parameter specifies any additional
ImageMagick commands, that the user wishes to add. |
static String |
PARAM_IS_PERCENT_RESIZE
This optional
Boolean flag parameter specifies how the
PARAM_RESIZE_HEIGHT and PARAM_RESIZE_WIDTH parameters are interpreted. |
static String |
PARAM_MAINTAIN_ASPECT_RATIO
This optional
Boolean flag parameter determines whether the
rendered image maintains its original aspect ratio or is stretched to fit
the specified height and width. |
static String |
PARAM_RESIZE_HEIGHT
|
static String |
PARAM_RESIZE_TO_THUMBNAIL
This optional
Boolean flag parameter specifies a mode for
dramatically shrinking large images in a performant way.If set to true the rendering process will be more performant
for large images but the rendered image will be of lower quality. |
static String |
PARAM_RESIZE_WIDTH
|
CANCELLED_ACTION_POLLING_INTERVAL, PARAM_MAX_PAGES, PARAM_MAX_SOURCE_SIZE_K_BYTES, PARAM_PAGE_LIMIT, PARAM_READ_LIMIT_K_BYTES, PARAM_READ_LIMIT_TIME_MS, PARAM_TIMEOUT_MS, PARAM_USE
actionTrackingService, CONTENT_READER_NOT_FOUND_MESSAGE, contentService, DEFAULT_RUN_AS_NAME, mimetypeMap, nodeService, PARAM_ENCODING, PARAM_MIME_TYPE, PARAM_PLACEHOLDER_RESOURCE_PATH, PARAM_RUN_AS, PARAM_SOURCE_CONTENT_PROPERTY, PARAM_TARGET_CONTENT_PROPERTY, PARAM_UPDATE_RENDITIONS_ON_ANY_PROPERTY_CHANGE
actionDefinition, applicableTypes, publicAction
adhocPropertiesAllowed, DISPLAY_LABEL, runtimeActionService
name
PARAM_RESULT
Constructor and Description |
---|
ImageRenderingEngine() |
Modifier and Type | Method and Description |
---|---|
protected void |
checkParameterValues(Action action)
This method can be overridden by subclasses to provide checking of parameter
values.
|
protected Collection<ParameterDefinition> |
getParameterDefinitions()
Supplies the list of parameters required by this rendering engine.
|
protected String |
getTargetMimeType(AbstractRenderingEngine.RenderingContext context) |
protected TransformationOptions |
getTransformOptions(AbstractRenderingEngine.RenderingContext context) |
protected TransformationOptions |
getTransformOptionsImpl(TransformationOptions options,
AbstractRenderingEngine.RenderingContext context) |
protected void |
render(AbstractRenderingEngine.RenderingContext context) |
getExecutorService, getSourceOptionsSerializers, init, setSourceOptionsSerializers
addParameterDefinitions, checkActionIsRenditionDefinition, checkSourceNodeExists, createActionDefinition, executeImpl, executeImpl, executeRenditionImpl, getCheckedParam, getDefaultRenditionContentProp, getDefaultRenditionNodeType, getExecutionSummary, getParamDisplayLabel, getParamWithDefault, getRenditionContentProperty, getTargetEncoding, notifyCallbackOfException, notifyCallbackOfResult, resolveRenditionLocation, setActionTrackingService, setBehaviourFilter, setContentService, setDefaultRenditionContentProp, setDefaultRenditionNodeType, setMimetypeMap, setNodeService, setRenditionLocationResolver, setRenditionService, switchToFinalRenditionNode, tagSourceNodeAsRenditioned, throwWrappedException
execute, getActionDefinition, getIgnoreLock, getQueueName, getTrackStatus, isApplicableType, onLogException, setApplicableTypes, setBaseNodeService, setDictionaryService, setIgnoreLock, setLockService, setMlAwareNodeService, setPublicAction, setQueueName, setTrackStatus
checkMandatoryProperties, getAdhocPropertiesAllowed, getDescriptionKey, getLocalizedParameterDefinitions, getParamDisplayLabel, getParameterDefintions, getTitleKey, setAdhocPropertiesAllowed, setLocales, setRuntimeActionService, toString
setBeanName
public static final String NAME
public static final String PARAM_RESIZE_WIDTH
Integer
or Float
parameter specifies the
width of the image after resizing. This may be expressed as pixels or it
may represent a percentage of the original image width, depending on the
value of the PARAM_IS_PERCENT_RESIZE parameter. public static final String PARAM_RESIZE_HEIGHT
Integer
or Float
parameter specifies the
height of the image after resizing. This may be expressed as pixels or it
may represent a percentage of the original image width, depending on the
value of the PARAM_IS_PERCENT_RESIZE parameter. public static final String PARAM_IS_PERCENT_RESIZE
Boolean
flag parameter specifies how the
PARAM_RESIZE_HEIGHT and PARAM_RESIZE_WIDTH parameters are interpreted. If
this parameter is set to true
then the rendition height and
width are represented as a percentage of the original image height and
width. If this parameter is set to false
then the rendition
height and width are represented as pixels. This parameter defaults to
false
.public static final String PARAM_MAINTAIN_ASPECT_RATIO
Boolean
flag parameter determines whether the
rendered image maintains its original aspect ratio or is stretched to fit
the specified height and width. true
then the rendered image will
always maintain its aspect ratio and will be resized to best fit within
the given width and height. For example if an image starts at 100x200
pixels and it is resized to 50x50 pixels then the rendered image will
actually be 25x50 pixels. false
then the image will be stretched
or compressed to fit the given height and width, regardless of the
original aspect ratio. false
public static final String PARAM_RESIZE_TO_THUMBNAIL
Boolean
flag parameter specifies a mode for
dramatically shrinking large images in a performant way.true
the rendering process will be more performant
for large images but the rendered image will be of lower quality. false
the rendering process will take longer but
the resulting image will usually be of better quality.public static final String PARAM_ALLOW_ENLARGEMENT
Boolean
flag parameter specifies whether image resizing
should produce an enlarged image, based on the resizing parameters and the size
of the original image. If true (the default), images may be enlarged.
If false, resize operations that would enlarge the image will instead produce a copy
of the original image at the same size.public static final String PARAM_COMMAND_OPTIONS
String
parameter specifies any additional
ImageMagick commands, that the user wishes to add. These commands are
appended after the various crop and resize options.public static final String PARAM_AUTO_ORIENTATION
Boolean
flag parameter specifies if the engine should
automatically rotate and image based on the EXIF orientation flag. If
this parameter is set to true
then the engine reads
and resets the EXIF image profile setting 'Orientation' and then performs
the appropriate 90 degree rotation on the image to orient the image,
for correct viewing.
This parameter defaults to true
.protected TransformationOptions getTransformOptions(AbstractRenderingEngine.RenderingContext context)
getTransformOptions
in class AbstractTransformationRenderingEngine
protected TransformationOptions getTransformOptionsImpl(TransformationOptions options, AbstractRenderingEngine.RenderingContext context)
getTransformOptionsImpl
in class AbstractTransformationRenderingEngine
protected String getTargetMimeType(AbstractRenderingEngine.RenderingContext context)
getTargetMimeType
in class AbstractRenderingEngine
protected void checkParameterValues(Action action)
AbstractRenderingEngine
checkParameterValues
in class AbstractRenderingEngine
protected void render(AbstractRenderingEngine.RenderingContext context)
render
in class AbstractTransformationRenderingEngine
protected Collection<ParameterDefinition> getParameterDefinitions()
AbstractRenderingEngine
getParameterDefinitions
in class AbstractTransformationRenderingEngine
Copyright © 2005–2017 Alfresco Software. All rights reserved.