All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class picture.JpegEncoder

java.lang.Object
   |
   +----picture.ImageEncoder
           |
           +----picture.JpegEncoder

public class JpegEncoder
extends ImageEncoder
Write out an image as a JPEG. DOESN'T WORK YET.

Fetch the software.
Fetch the entire Acme package.

See Also:
ToJpeg

Variable Index

 o height
 o jfifHuff100Header
 o jfifNoHuff100Header
 o qfactor
 o rgbPixels
 o width

Constructor Index

 o JpegEncoder(Image, OutputStream)
 o JpegEncoder(ImageProducer, OutputStream)

Method Index

 o encodeDone()
Subclasses implement this to finish an encoding.
 o encodePixels(int, int, int, int, int[], int, int)
Subclasses implement this to actually write out some bits.
 o encodeStart(int, int)
Subclasses implement this to initialize an encoding.
 o setQfactor(int)
 o writeJfifHuffHeader()
 o writeJfifNoHuffHeader()

Variables

 o qfactor
 int qfactor
 o width
 int width
 o height
 int height
 o rgbPixels
 int rgbPixels[][]
 o jfifHuff100Header
 private static byte jfifHuff100Header[]
 o jfifNoHuff100Header
 private static byte jfifNoHuff100Header[]

Constructors

 o JpegEncoder
 public JpegEncoder(Image img,
                    OutputStream out) throws IOException
 o JpegEncoder
 public JpegEncoder(ImageProducer prod,
                    OutputStream out) throws IOException

Methods

 o setQfactor
 public void setQfactor(int qfactor)
 o encodeStart
 void encodeStart(int width,
                  int height) throws IOException
Subclasses implement this to initialize an encoding.

Overrides:
encodeStart in class ImageEncoder
 o encodePixels
 void encodePixels(int x,
                   int y,
                   int w,
                   int h,
                   int rgbPixels[],
                   int off,
                   int scansize) throws IOException
Subclasses implement this to actually write out some bits.

Overrides:
encodePixels in class ImageEncoder
 o encodeDone
 void encodeDone() throws IOException
Subclasses implement this to finish an encoding.

Overrides:
encodeDone in class ImageEncoder
 o writeJfifHuffHeader
 private void writeJfifHuffHeader() throws IOException
 o writeJfifNoHuffHeader
 private void writeJfifNoHuffHeader() throws IOException

All Packages  Class Hierarchy  This Package  Previous  Next  Index