public class ImageMagickContentTransformerWorker extends AbstractImageMagickContentTransformerWorker
MIMETYPE_IMAGE_PREFIX| Constructor and Description |
|---|
ImageMagickContentTransformerWorker()
Default constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet()
Checks for the JMagick and ImageMagick dependencies, using the common
transformation method to check
that the sample image can be converted. |
java.lang.String |
getVersionString()
Gets the version string captured from the check command.
|
void |
setCheckCommand(org.alfresco.util.exec.RuntimeExec checkCommand)
Sets the command that must be executed in order to retrieve version information from the converting executable
and thus test that the executable itself is present.
|
void |
setExecuter(org.alfresco.util.exec.RuntimeExec executer)
Set the runtime command executer that must be executed in order to run
ImageMagick.
|
protected void |
transformInternal(java.io.File sourceFile,
java.io.File targetFile,
TransformationOptions options)
Transform the image content from the source file to the target file
|
isAvailable, isSupported, isTransformable, setAvailable, transformgetMimetype, getMimetypeService, isExplicitTransformation, isSupportedTransformation, setExplicitTransformations, setMimetypeService, setSupportedTransformationspublic ImageMagickContentTransformerWorker()
public void setExecuter(org.alfresco.util.exec.RuntimeExec executer)
The command must contain the variables ${source} and
${target}, which will be replaced by the names of the file to
be transformed and the name of the output file respectively.
convert ${source} ${target}
executer - the system command executerpublic void setCheckCommand(org.alfresco.util.exec.RuntimeExec checkCommand)
checkCommand - command executer to retrieve version informationpublic java.lang.String getVersionString()
public void afterPropertiesSet()
transformation method to check
that the sample image can be converted.afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanafterPropertiesSet in class AbstractImageMagickContentTransformerWorkerprotected void transformInternal(java.io.File sourceFile,
java.io.File targetFile,
TransformationOptions options)
throws java.lang.Exception
transformInternal in class AbstractImageMagickContentTransformerWorkersourceFile - the source of the transformationtargetFile - the target of the transformationoptions - the transformation options supported by ImageMagickjava.lang.ExceptionCopyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.