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 TypeMethodDescriptionvoid
setImgMgkPath
(String imgMgkPath) void
setProcessTimeoutSecs
(int processTimeoutSecs) void
Transforms the image atsourcePath
and 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:ImageTransformer
Transforms the image atsourcePath
and saves it intotargetPath
.- Specified by:
transform
in 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
-