Methods Summary |
---|
public static JPEGImageDecoder | createJPEGDecoder(java.io.InputStream src)This creates an instance of a JPEGImageDecoder that can be used
to decode JPEG Data streams.
return new JPEGImageDecoderImpl(src);
|
public static JPEGImageDecoder | createJPEGDecoder(java.io.InputStream src, JPEGDecodeParam jdp)This creates an instance of a JPEGImageDecoder that can be used
to decode JPEG Data streams.
return new JPEGImageDecoderImpl(src, jdp);
|
public static JPEGImageEncoder | createJPEGEncoder(java.io.OutputStream dest)This creates an instance of a JPEGImageEncoder that can be used
to encode image data as JPEG Data streams.
return new JPEGImageEncoderImpl(dest);
|
public static JPEGImageEncoder | createJPEGEncoder(java.io.OutputStream dest, JPEGEncodeParam jep)This creates an instance of a JPEGImageEncoder that can be used
to encode image data as JPEG Data streams.
return new JPEGImageEncoderImpl(dest, jep);
|
public static JPEGEncodeParam | getDefaultJPEGEncodeParam(java.awt.image.BufferedImage bi)This is a factory method for creating JPEGEncodeParam objects.
The returned object should do a credible job of encoding the
given BufferedImage.
int colorID = JPEGParam.getDefaultColorId(bi.getColorModel());
return getDefaultJPEGEncodeParam(bi.getRaster(), colorID);
|
public static 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 recommended that you
stick to the BufferedImage interface.
JPEGParam ret = new JPEGParam(colorID, ras.getNumBands());
ret.setWidth(ras.getWidth());
ret.setHeight(ras.getHeight());
return ret;
|
public static 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.
This can also be used as a factory for a JPEGDecodeParam object.
However this usage is extremely rare, as one needs to be decoding
abbreviated JPEG streams where the JPEG tables are coming from
some source other than a JPEG tables only stream.
return new JPEGParam(colorID, numBands);
|
public static 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).
return new JPEGParam(jdp);
|