Methods Summary |
---|
public void | encode(java.awt.image.Raster ras)Encode a Raster as a JPEG data stream. Note that no color
conversion takes place. It is required that you match the
Raster to the encoded COLOR_ID contained in the current
JPEGEncodeParam object.
If no JPEGEncodeParam object has been provided yet a
new JPEGEncodeParam object will be created by calling
getDefaultJPEGEncodeParam with ras and COLOR_ID_UNKNOWN.
|
public void | encode(java.awt.image.Raster ras, JPEGEncodeParam jep)Encode a Raster as a JPEG data stream. Note that no color
conversion takes place. It is required that you match the
Raster to the encoded COLOR_ID contained in the JPEGEncodeParam
object.
If jep is null a new JPEGEncodeParam object will be created by
calling getDefaultJPEGEncodeParam with ras and
COLOR_ID_UNKNOWN.
|
public void | encode(java.awt.image.BufferedImage bi)Encode a BufferedImage as a JPEG data stream. Note, some color
conversions may takes place. The current JPEGEncodeParam's
encoded COLOR_ID should match the value returned by
getDefaultColorID when given the BufferedImage's ColorModel.
If no JPEGEncodeParam object has been provided yet a default
one will be created by calling getDefaultJPEGEncodeParam with
bi.
|
public void | encode(java.awt.image.BufferedImage bi, JPEGEncodeParam jep)Encode a BufferedImage as a JPEG data stream. Note, some color
conversions may takes place. The jep's encoded COLOR_ID should
match the value returned by getDefaultColorID when given the
BufferedImage's ColorModel.
This call also sets the current JPEGEncodeParam object. The
given JPEGEncodeParam object will be used for this and future
encodings. If jep is null then a new JPEGEncodeParam object
will be created by calling getDefaultJPEGEncodeParam with bi.
|
public int | getDefaultColorId(java.awt.image.ColorModel cm)Returns the 'default' encoded COLOR_ID for a given ColorModel.
This method is not needed in the simple case of encoding
Buffered Images (the library will figure things out for you).
It can be useful for encoding Rasters. To determine what needs
to be done to the image prior to encoding.
|
public JPEGEncodeParam | getDefaultJPEGEncodeParam(JPEGDecodeParam jdp)This is a factory method for creating a JPEGEncodeParam from a
JPEGDecodeParam. This will return a new JPEGEncodeParam object
that is initialized from the JPEGDecodeParam object. All major
pieces of information will be initialized from the DecodeParam
(Markers, Tables, mappings).
|
public JPEGEncodeParam | getDefaultJPEGEncodeParam(java.awt.image.BufferedImage bi)This is a factory method for creating JPEGEncodeParam objects.
The returned object will do a credible job of encoding the
given BufferedImage.
|
public JPEGEncodeParam | getDefaultJPEGEncodeParam(java.awt.image.Raster ras, int colorID)This is a factory method for creating JPEGEncodeParam objects.
It is the users responsiblity to match the colorID with the
data contained in the Raster. Failure to do so may lead to
either poor compression or poor image quality. If you don't
understand much about JPEG it is strongly reccomended that you
stick to the BufferedImage interfaces.
|
public JPEGEncodeParam | getDefaultJPEGEncodeParam(int numBands, int colorID)This is a factory method for creating JPEGEncodeParam objects. It
is the users responsiblity to match the colorID with the given
number of bands, which should match the data being encoded.
Failure to do so may lead to poor compression and/or poor image
quality. If you don't understand much about JPEG it is strongly
recommended that you stick to the BufferedImage interface.
|
public JPEGEncodeParam | getJPEGEncodeParam()This returns a copy of the current JPEGEncodeParam object, if
you want changes to affect the encoding process you must 'set'
it back into the encoder (either through setJPEGEncodeParam or
by providing the modified param object in the call to encode.
|
public java.io.OutputStream | getOutputStream()Return the stream the Encoder is currenlt associated with.
|
public void | setJPEGEncodeParam(JPEGEncodeParam jep)Set the JPEGEncodeParam object that is to be used for future
encoding operations. 'jep' is copied so changes will not be
tracked, unless you call this method again.
|