Class ImageMagickTransformer
java.lang.Object
org.craftercms.studio.impl.v1.image.transformation.ImageMagickTransformer
- All Implemented Interfaces:
ImageTransformer
Transformer that calls ImageMagick from the command line with the options specified in the parameters.
- Author:
- avasquez
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsetImgMgkPath(String imgMgkPath) voidsetProcessTimeoutSecs(int processTimeoutSecs) voidTransforms the image atsourcePathand saves it intotargetPath.
-
Constructor Details
-
ImageMagickTransformer
public ImageMagickTransformer()
-
-
Method Details
-
setImgMgkPath
-
setProcessTimeoutSecs
public void setProcessTimeoutSecs(int processTimeoutSecs) -
transform
public void transform(Path sourcePath, Path targetPath, Map<String, String> parameters) throws ImageTransformationExceptionDescription copied from interface:ImageTransformerTransforms the image atsourcePathand saves it intotargetPath.- Specified by:
transformin interfaceImageTransformer- Parameters:
sourcePath- the source image pathtargetPath- the target path where to put the transformed image.parameters- additional parameters needed by the transformer- Throws:
ImageTransformationException- if an error occurred
-