Serializable, javax.servlet.Filter, javax.servlet.FilterConfigpublic 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 | 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 |
oncePerRequesttriggerParamsdefaultScaleQuality, PARAM_IMAGE, PARAM_SCALE_QUALITY, PARAM_SCALE_UNIFORM, PARAM_SCALE_UNITS, PARAM_SCALE_X, PARAM_SCALE_Y, UNITS_PERCENT, UNITS_PIXELS, UNITS_UNKNOWN| Constructor | Description |
|---|---|
CropFilter() |
| Modifier and Type | Method | 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) |
destroy, doFilter, getFilterConfig, getFilterName, getInitParameter, getInitParameterNames, getServletContext, init, init, log, log, setFilterConfig, setOncePerRequestdoFilterImpl, setTriggerParams, triggerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDimensions, getQuality, getUnits, setDefaultScaleQualityprotected 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 © 2018. All rights reserved.