Class TinifyTransformer
java.lang.Object
org.craftercms.studio.impl.v1.image.transformation.TinifyTransformer
- All Implemented Interfaces:
ImageTransformer
Transformer that used the Java client of TinyPNG to compress JPEG/PNG images.
- Author:
- avasquez
- See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
TinifyTransformer
public TinifyTransformer()
-
-
Method Details
-
setApiKey
-
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
-