public class BoundedResize extends AbstractCropAndResize
AbstractCropAndResize
implementation which will never crop,
and resize to either maxHeight or maxWidth while keeping the original image's ratio.Constructor and Description |
---|
BoundedResize() |
Modifier and Type | Method and Description |
---|---|
protected Coords |
getCroopCoords(BufferedImage source,
ParameterProvider params)
Determines the coordinates of the cropping to apply on the source image.
|
protected Size |
getEffectiveTargetSize(BufferedImage source,
Coords cropCoords,
ParameterProvider params)
Determines the actual size for the resized image based on the source image, the crop coordinates
calculated by
AbstractCropAndResize.getCroopCoords(java.awt.image.BufferedImage, P) and the given ParameterProvider. |
boolean |
getExpand() |
int |
getMaxHeight() |
int |
getMaxWidth() |
void |
setExpand(boolean expand) |
void |
setMaxHeight(int maxHeight) |
void |
setMaxWidth(int maxWidth) |
apply, getResizer, resize, setResizer
protected Coords getCroopCoords(BufferedImage source, ParameterProvider params) throws ImagingException
AbstractCropAndResize
getCroopCoords
in class AbstractCropAndResize
ImagingException
protected Size getEffectiveTargetSize(BufferedImage source, Coords cropCoords, ParameterProvider params)
AbstractCropAndResize
AbstractCropAndResize.getCroopCoords(java.awt.image.BufferedImage, P)
and the given ParameterProvider.getEffectiveTargetSize
in class AbstractCropAndResize
public int getMaxWidth()
public void setMaxWidth(int maxWidth)
public int getMaxHeight()
public void setMaxHeight(int maxHeight)
public boolean getExpand()
public void setExpand(boolean expand)
Copyright © 2016 Magnolia International Ltd.. All rights reserved.