Class AbstractScaleImageOperation
java.lang.Object
org.hippoecm.frontend.plugins.gallery.imageutil.AbstractImageOperation
org.hippoecm.frontend.plugins.gallery.imageutil.AbstractScaleImageOperation
- All Implemented Interfaces:
ImageOperation
- Direct Known Subclasses:
ScaleImageOperation
,ScaleSvgOperation
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractScaleImageOperation
(ScalingParameters parameters) -
Method Summary
Modifier and TypeMethodDescriptionprotected Rectangle
calculateCropArea
(double originalWidth, double originalHeight, double variantWidth, double variantHeight) protected Dimension
calculateCroppedDimension
(Rectangle cropArea) protected double
calculateResizeRatio
(double originalWidth, double originalHeight) protected double
calculateResizeRatio
(double originalWidth, double originalHeight, int targetWidth, int targetHeight) Deprecated.protected Dimension
calculateScaledDimension
(int originalWidth, int originalHeight) float
Deprecated.UseScalingParameters.getCompressionQuality()
()} insteadprotected ScalingParameters
Deprecated.useImageOperationResult.getData()
insteadint
Deprecated.UseImageOperationResult.getHeight()
insteadint
Deprecated.useImageOperationResult.getWidth()
insteadprotected boolean
Methods inherited from class org.hippoecm.frontend.plugins.gallery.imageutil.AbstractImageOperation
execute, execute, getResult, run, setResult, writeToTmpFile
-
Constructor Details
-
AbstractScaleImageOperation
-
-
Method Details
-
getParameters
-
getCompressionQuality
Deprecated.UseScalingParameters.getCompressionQuality()
()} instead -
getScaledData
Deprecated.useImageOperationResult.getData()
instead- Returns:
- the scaled image data
-
getScaledWidth
Deprecated.useImageOperationResult.getWidth()
instead- Returns:
- the width of this scaled image
-
getScaledHeight
Deprecated.UseImageOperationResult.getHeight()
instead- Returns:
- the height of this scaled image
-
isOriginalVariant
protected boolean isOriginalVariant() -
calculateResizeRatio
protected double calculateResizeRatio(double originalWidth, double originalHeight) -
calculateScaledDimension
-
calculateCroppedDimension
-
calculateCropArea
protected Rectangle calculateCropArea(double originalWidth, double originalHeight, double variantWidth, double variantHeight) -
calculateResizeRatio
@Deprecated protected double calculateResizeRatio(double originalWidth, double originalHeight, int targetWidth, int targetHeight) Deprecated.
-
ImageUtils.determineResizeRatio(double, double, int, int)
instead