Class ScaleSvgOperation
- java.lang.Object
-
- org.hippoecm.frontend.plugins.gallery.imageutil.AbstractImageOperation
-
- org.hippoecm.frontend.plugins.gallery.imageutil.AbstractScaleImageOperation
-
- org.hippoecm.frontend.plugins.gallery.imageutil.ScaleSvgOperation
-
- All Implemented Interfaces:
ImageOperation
public class ScaleSvgOperation extends AbstractScaleImageOperation
-
-
Field Summary
Fields Modifier and Type Field Description static org.slf4j.Logger
log
-
Constructor Summary
Constructors Constructor Description ScaleSvgOperation(ScalingParameters parameters)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
execute(InputStream data, ImageReader reader, ImageWriter writer)
Executes a concrete image operation.ImageOperationResult
run(InputStream data, String mimeType)
Runs an image operation and returns the result.-
Methods inherited from class org.hippoecm.frontend.plugins.gallery.imageutil.AbstractScaleImageOperation
calculateResizeRatio, calculateResizeRatio, getCompressionQuality, getParameters, getScaledData, getScaledHeight, getScaledWidth
-
Methods inherited from class org.hippoecm.frontend.plugins.gallery.imageutil.AbstractImageOperation
execute, getResult, setResult
-
-
-
-
Constructor Detail
-
ScaleSvgOperation
public ScaleSvgOperation(ScalingParameters parameters)
-
-
Method Detail
-
run
public ImageOperationResult run(InputStream data, String mimeType) throws GalleryException
Description copied from interface:ImageOperation
Runs an image operation and returns the result.- Specified by:
run
in interfaceImageOperation
- Overrides:
run
in classAbstractImageOperation
- Parameters:
data
- the image data. The stream is closed by this method.mimeType
- MIME type of the image- Throws:
GalleryException
- when the image operation fails
-
execute
public void execute(InputStream data, ImageReader reader, ImageWriter writer) throws IOException
Description copied from class:AbstractImageOperation
Executes a concrete image operation.- Specified by:
execute
in classAbstractImageOperation
- Parameters:
data
- the image data. Closing the stream is the responsibility of the caller (i.e. this class).reader
- reader for the image datawriter
- writer for the image data- Throws:
IOException
- when the image operation fails
-
-