| java.lang.Object sun.awt.image.ImageDecoderFactory
All known Subclasses: sun.awt.qt.QtImageDecoderFactory,
ImageDecoderFactory | public class ImageDecoderFactory (Code) | | ImageDecoderFactory allows the peer implementations to
provide alternative image decoder implementations that can be used
image decoding framework. There is always a default instance created
that uses the decoders that are part of the sun.awt.image
package.
sun.awt.image.InputStreamImageSource.getDecoder() method
gets the instance of ImageDecoderFactory using
ImageDecoderFactory.getInstance() and uses the factory to
create various decoders.
Plugging Alternative Factories
The peer implementation can provide alternate implementations for the
image decoders. To do that they need to do the following
- Subclass
sun.awt.image.ImageDecoderFactory and provide
implementation for ImageDecoderFactory.newImageDecoder()
- Create an instance of the subclass and register it with
sun.awt.image.ImageDecoderFactory.setFactory()
|
IMG_FORMAT_GIF | final public static String IMG_FORMAT_GIF(Code) | | GIF Image format
|
IMG_FORMAT_JPG | final public static String IMG_FORMAT_JPG(Code) | | JPEG Image format
|
IMG_FORMAT_PNG | final public static String IMG_FORMAT_PNG(Code) | | PNG Image format
|
IMG_FORMAT_XBM | final public static String IMG_FORMAT_XBM(Code) | | XBM Image format
|
setFactory | public static synchronized void setFactory(ImageDecoderFactory factory)(Code) | | Sets the ImageDecoderFactory instance. This can be
called by the peer implementation to change the decoder factory
|
|
|