| org.apache.cocoon.reading.AbstractReader org.apache.cocoon.reading.ResourceReader org.apache.cocoon.reading.ImageReader
ImageReader | final public class ImageReader extends ResourceReader (Code) | | The ImageReader component is used to serve binary image data
in a sitemap pipeline. It makes use of HTTP Headers to determine if
the requested resource should be written to the OutputStream
or if it can signal that it hasn't changed.
Parameters:
- <width>
- This parameter is optional. When specified, it determines the
width of the binary image.
If no height parameter is specified, the aspect ratio
of the image is kept. The parameter may be expressed as an int or a percentage.
- <height>
- This parameter is optional. When specified, it determines the
height of the binary image.
If no width parameter is specified, the aspect ratio
of the image is kept. The parameter may be expressed as an int or a percentage.
- <scale(Red|Green|Blue)>
- This parameter is optional. When specified it will cause the
specified color component in the image to be multiplied by the
specified floating point value.
- <offset(Red|Green|Blue)>
- This parameter is optional. When specified it will cause the
specified color component in the image to be incremented by the
specified floating point value.
- <grayscale>
- This parameter is optional. When specified and set to true it
will cause each image pixel to be normalized. Default is "false".
- <allow-enlarging>
- This parameter is optional. By default, if the image is smaller
than the specified width and height, the image will be enlarged.
In some circumstances this behaviour is undesirable, and can be
switched off by setting this parameter to "
false " so that
images will be reduced in size, but not enlarged. The default is
"true ".
- <quality>
- This parameter is optional. By default, the quality uses the
default for the JVM. If it is specified, the proper JPEG quality
compression is used. The range is 0.0 to 1.0, if specified.
version: $Id: ImageReader.java 433543 2006-08-22 06:22:54Z crossley $ |
getKey | public Serializable getKey()(Code) | | Generate the unique key.
This key must be unique inside the space of this component.
The generated key consists of the src and width and height,and the color transform parameters |
recycle | public void recycle()(Code) | | |
setupHeaders | protected void setupHeaders()(Code) | | |
|
|