Class TinifyTransformer
- java.lang.Object
-
- org.craftercms.studio.impl.v1.image.transformation.TinifyTransformer
-
- All Implemented Interfaces:
ImageTransformer
public class TinifyTransformer extends Object implements ImageTransformer
Transformer that used the Java client of TinyPNG to compress JPEG/PNG images.- Author:
- avasquez
- See Also:
- TinyPNG
-
-
Constructor Summary
Constructors Constructor Description TinifyTransformer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidsetApiKey(String apiKey)voidtransform(Path sourcePath, Path targetPath, Map<String,String> parameters)Transforms the image atsourcePathand saves it intotargetPath.
-
-
-
Method Detail
-
setApiKey
public void setApiKey(String apiKey)
-
transform
public void transform(Path sourcePath, Path targetPath, Map<String,String> parameters) throws ImageTransformationException
Description 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
-
-