public class CropFilter extends ScaleFilter
cropXcropYcropWidthcropHeightcropUniformtrue.
cropUnitsPIXELS, PERCENT.
PIXELS is default.
imagescaleXscaleYscaleUniformtrue.
scaleUnitsPIXELS, PERCENT.
PIXELS is default.
scaleQualitySCALE_SMOOTH, SCALE_FAST,
SCALE_REPLICATE, SCALE_AREA_AVERAGING.
SCALE_DEFAULT is default.
| Modifier and Type | Field and Description |
|---|---|
protected static String |
PARAM_CROP_HEIGHT
cropHeight |
protected static String |
PARAM_CROP_UNIFORM
cropUniform |
protected static String |
PARAM_CROP_UNITS
cropUnits |
protected static String |
PARAM_CROP_WIDTH
cropWidth |
protected static String |
PARAM_CROP_X
cropX |
protected static String |
PARAM_CROP_Y
cropY |
defaultScaleQuality, PARAM_IMAGE, PARAM_SCALE_QUALITY, PARAM_SCALE_UNIFORM, PARAM_SCALE_UNITS, PARAM_SCALE_X, PARAM_SCALE_Y, UNITS_PERCENT, UNITS_PIXELS, UNITS_UNKNOWNtriggerParamsoncePerRequest| Constructor and Description |
|---|
CropFilter() |
| Modifier and Type | Method and Description |
|---|---|
protected RenderedImage |
doFilter(BufferedImage pImage,
javax.servlet.ServletRequest pRequest,
ImageServletResponse pResponse)
Reads the image from the requested URL, scales it, crops it, and returns
it in the
Servlet stream.
|
protected Rectangle |
getBounds(int pX,
int pY,
int pWidth,
int pHeight,
int pUnits,
boolean pUniform,
BufferedImage pImg) |
getDimensions, getQuality, getUnits, setDefaultScaleQualitydoFilterImpl, setTriggerParams, triggerdestroy, doFilter, getFilterConfig, getFilterName, getInitParameter, getInitParameterNames, getServletContext, init, init, log, log, setFilterConfig, setOncePerRequestprotected static final String PARAM_CROP_X
cropXprotected static final String PARAM_CROP_Y
cropYprotected static final String PARAM_CROP_WIDTH
cropWidthprotected static final String PARAM_CROP_HEIGHT
cropHeightprotected static final String PARAM_CROP_UNIFORM
cropUniformprotected static final String PARAM_CROP_UNITS
cropUnitsprotected RenderedImage doFilter(BufferedImage pImage, javax.servlet.ServletRequest pRequest, ImageServletResponse pResponse)
doFilter in class ScaleFilterpImage - the image to filterpRequest - the servlet requestpResponse - the servlet responseprotected Rectangle getBounds(int pX, int pY, int pWidth, int pHeight, int pUnits, boolean pUniform, BufferedImage pImg)
Copyright © 2017. All rights reserved.