Serializable
, javax.servlet.Filter
, javax.servlet.FilterConfig
public class CropFilter extends ScaleFilter
cropX
cropY
cropWidth
cropHeight
cropUniform
true
.
cropUnits
PIXELS
, PERCENT
.
PIXELS
is default.
image
scaleX
scaleY
scaleUniform
true
.
scaleUnits
PIXELS
, PERCENT
.
PIXELS
is default.
scaleQuality
SCALE_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 |
oncePerRequest
triggerParams
defaultScaleQuality, 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, setOncePerRequest
doFilterImpl, setTriggerParams, trigger
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDimensions, getQuality, getUnits, setDefaultScaleQuality
protected static final String PARAM_CROP_X
cropX
protected static final String PARAM_CROP_Y
cropY
protected static final String PARAM_CROP_WIDTH
cropWidth
protected static final String PARAM_CROP_HEIGHT
cropHeight
protected static final String PARAM_CROP_UNIFORM
cropUniform
protected static final String PARAM_CROP_UNITS
cropUnits
protected RenderedImage doFilter(BufferedImage pImage, javax.servlet.ServletRequest pRequest, ImageServletResponse pResponse)
doFilter
in class ScaleFilter
pImage
- 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.