Interface ImageServletResponse
-
- All Superinterfaces:
javax.servlet.ServletResponse
@Deprecated public interface ImageServletResponse extends javax.servlet.ServletResponse
Deprecated.ImageServletResponse.The request attributes regarding image size and source region (AOI) are used in the decoding process, and must be set before the first invocation of
getImage()
to have any effect.- Version:
- $Id: ImageServletResponse.java#4 $
- Author:
- Harald Kuhr
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ATTRIB_AOI
Deprecated.Request attribute of typeRectangle
controlling image source region (area of interest).static java.lang.String
ATTRIB_AOI_PERCENT
Deprecated.Request attribute of typeBoolean
controlling image AOI.static java.lang.String
ATTRIB_AOI_UNIFORM
Deprecated.Request attribute of typeBoolean
controlling image AOI.static java.lang.String
ATTRIB_BG_COLOR
Deprecated.Request attribute of typeColor
controlling background color for any transparent/translucent areas of the image.static java.lang.String
ATTRIB_IMAGE_RESAMPLE_ALGORITHM
Deprecated.Request attribute of typeInteger
controlling image resample algorithm.static java.lang.String
ATTRIB_OUTPUT_QUALITY
Deprecated.Request attribute of typeFloat
controlling image output compression/quality.static java.lang.String
ATTRIB_READ_SUBSAMPLING_FACTOR
Deprecated.Request attribute of typeDouble
controlling image read subsampling factor.static java.lang.String
ATTRIB_SIZE
Deprecated.Request attribute of typeDimension
controlling image size.static java.lang.String
ATTRIB_SIZE_PERCENT
Deprecated.Request attribute of typeBoolean
controlling image sizing.static java.lang.String
ATTRIB_SIZE_UNIFORM
Deprecated.Request attribute of typeBoolean
controlling image sizing.
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
flush()
Deprecated.Writes the image to the originalServletOutputStream
.java.awt.image.BufferedImage
getImage()
Deprecated.Gets the decoded image from the response.java.lang.String
getOutputContentType()
Deprecated.Gets the image format for this response, such as "image/gif" or "image/jpeg".void
setImage(java.awt.image.RenderedImage pImage)
Deprecated.Sets the image for this response.void
setOutputContentType(java.lang.String pImageFormat)
Deprecated.Sets the image format for this response, such as "image/gif" or "image/jpeg".-
Methods inherited from interface javax.servlet.ServletResponse
flushBuffer, getBufferSize, getCharacterEncoding, getContentType, getLocale, getOutputStream, getWriter, isCommitted, reset, resetBuffer, setBufferSize, setCharacterEncoding, setContentLength, setContentLengthLong, setContentType, setLocale
-
-
-
-
Field Detail
-
ATTRIB_SIZE
static final java.lang.String ATTRIB_SIZE
Deprecated.Request attribute of typeDimension
controlling image size. If eitherwidth
orheight
is negative, the size is computed, using uniform scaling. Else, ifSIZE_UNIFORM
istrue
, the size will be computed to the largest possible area (with correct aspect ratio) fitting inside the target area. Otherwise, the image is scaled to the given size, with no regard to aspect ratio.Defaults to
null
(original image size).- See Also:
- Constant Field Values
-
ATTRIB_SIZE_UNIFORM
static final java.lang.String ATTRIB_SIZE_UNIFORM
Deprecated.Request attribute of typeBoolean
controlling image sizing.Defaults to
Boolean.TRUE
.- See Also:
- Constant Field Values
-
ATTRIB_SIZE_PERCENT
static final java.lang.String ATTRIB_SIZE_PERCENT
Deprecated.Request attribute of typeBoolean
controlling image sizing.Defaults to
Boolean.FALSE
.- See Also:
- Constant Field Values
-
ATTRIB_AOI
static final java.lang.String ATTRIB_AOI
Deprecated.Request attribute of typeRectangle
controlling image source region (area of interest).Defaults to
null
(the entire image).- See Also:
- Constant Field Values
-
ATTRIB_AOI_UNIFORM
static final java.lang.String ATTRIB_AOI_UNIFORM
Deprecated.Request attribute of typeBoolean
controlling image AOI.Defaults to
Boolean.FALSE
.- See Also:
- Constant Field Values
-
ATTRIB_AOI_PERCENT
static final java.lang.String ATTRIB_AOI_PERCENT
Deprecated.Request attribute of typeBoolean
controlling image AOI.Defaults to
Boolean.FALSE
.- See Also:
- Constant Field Values
-
ATTRIB_BG_COLOR
static final java.lang.String ATTRIB_BG_COLOR
Deprecated.Request attribute of typeColor
controlling background color for any transparent/translucent areas of the image.Defaults to
null
(keeps the transparent areas transparent).- See Also:
- Constant Field Values
-
ATTRIB_OUTPUT_QUALITY
static final java.lang.String ATTRIB_OUTPUT_QUALITY
Deprecated.Request attribute of typeFloat
controlling image output compression/quality. Used for formats that accepts compression or quality settings, like JPEG (quality), PNG (compression only) etc.Defaults to
0.8f
for JPEG.- See Also:
- Constant Field Values
-
ATTRIB_READ_SUBSAMPLING_FACTOR
static final java.lang.String ATTRIB_READ_SUBSAMPLING_FACTOR
Deprecated.Request attribute of typeDouble
controlling image read subsampling factor. Controls the maximum sample pixels in each direction, that is read per pixel in the output image, if the result will be downscaled. Larger values will result in better quality, at the expense of higher memory consumption and CPU usage. However, using values above3.0
will usually not improve image quality. Legal values are in the range[1.0 .. positive infinity>
.Defaults to
2.0
.- See Also:
- Constant Field Values
-
ATTRIB_IMAGE_RESAMPLE_ALGORITHM
static final java.lang.String ATTRIB_IMAGE_RESAMPLE_ALGORITHM
Deprecated.Request attribute of typeInteger
controlling image resample algorithm. Legal values areSCALE_DEFAULT
,SCALE_FAST
orSCALE_SMOOTH
.Note: When using a value of
SCALE_FAST
, you should also use a subsampling factor of1.0
, for fast read/scale. Otherwise, use a subsampling factor of2.0
for better quality.Defaults to
SCALE_DEFAULT
.- See Also:
- Constant Field Values
-
-
Method Detail
-
getOutputContentType
java.lang.String getOutputContentType()
Deprecated.Gets the image format for this response, such as "image/gif" or "image/jpeg". If not set, the default format is that of the original image.- Returns:
- the image format for this response.
- See Also:
setOutputContentType(String)
-
setOutputContentType
void setOutputContentType(java.lang.String pImageFormat)
Deprecated.Sets the image format for this response, such as "image/gif" or "image/jpeg".As an example, a custom filter could do content negotiation based on the request header fields and write the image back in an appropriate format.
If not set, the default format is that of the original image.
- Parameters:
pImageFormat
- the image format for this response.
-
flush
void flush() throws java.io.IOException
Deprecated.Writes the image to the originalServletOutputStream
. If no format is set in this response, the image is encoded in the same format as the original image.- Throws:
java.io.IOException
- if an I/O exception occurs during writing
-
getImage
java.awt.image.BufferedImage getImage() throws java.io.IOException
Deprecated.Gets the decoded image from the response.- Returns:
- a
BufferedImage
ornull
if the image could not be read. - Throws:
java.io.IOException
- if an I/O exception occurs during reading
-
setImage
void setImage(java.awt.image.RenderedImage pImage)
Deprecated.Sets the image for this response.- Parameters:
pImage
- the new response image.
-
-