Class ImageMagickTransformer
- java.lang.Object
-
- org.craftercms.studio.impl.v1.image.transformation.ImageMagickTransformer
-
- All Implemented Interfaces:
ImageTransformer
public class ImageMagickTransformer extends Object implements ImageTransformer
Transformer that calls ImageMagick from the command line with the options specified in the parameters.- Author:
- avasquez
- See Also:
- ImageMagick
-
-
Constructor Summary
Constructors Constructor Description ImageMagickTransformer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
setImgMgkPath(String imgMgkPath)
void
setProcessTimeoutSecs(int processTimeoutSecs)
void
transform(Path sourcePath, Path targetPath, Map<String,String> parameters)
Transforms the image atsourcePath
and saves it intotargetPath
.
-
-
-
Method Detail
-
setImgMgkPath
public void setImgMgkPath(String imgMgkPath)
-
setProcessTimeoutSecs
public void setProcessTimeoutSecs(int processTimeoutSecs)
-
transform
public void transform(Path sourcePath, Path targetPath, Map<String,String> parameters) throws ImageTransformationException
Description 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
-
-