All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.visualtek.png.PNGEncoder

java.lang.Object
   |
   +----com.visualtek.png.PNGEncoder

public class PNGEncoder
extends Object
implements ImageConsumer
PNG Encoder.


Constructor Index

 o PNGEncoder()
Constructs PNG empty encoder
 o PNGEncoder(Image, OutputStream)
Constructs PNG encoder
 o PNGEncoder(Image, String)
Constructs PNG encoder
 o PNGEncoder(ImageProducer, OutputStream)
Constructs PNG encoder

Method Index

 o encode()
Strats encoding
 o encodeDone()
Stops encoding proccess.
 o imageComplete(int)
Sets the image status.
 o setColorModel(ColorModel)
Sets the color model for this image Implements java.awt.image.ImageConsumer.setColorModel() method
 o setDimensions(int, int)
Sets width and height of this image Implements java.awt.image.ImageConsumer.setDimensions() method
 o setHints(int)
Sets the hints for this image Implements java.awt.image.ImageConsumer.setHints() method
 o setImage(Image)
Sets image to encode
 o setImage(ImageProducer)
Sets image producer of the image to encode
 o setOutput(OutputStream)
Sets output stream for encoded image
 o setPixels(int, int, int, int, ColorModel, byte[], int, int)
Sets the pixels of this image.
 o setPixels(int, int, int, int, ColorModel, int[], int, int)
Sets the pixels of this image.
 o setProperties(Hashtable)
Sets the extensible list of properties associated with this image Implements java.awt.image.ImageConsumer.setProperties() method

Constructors

 o PNGEncoder
 public PNGEncoder()
Constructs PNG empty encoder

 o PNGEncoder
 public PNGEncoder(Image img,
                   String filename) throws IOException
Constructs PNG encoder

Parameters:
Image - image - Image to encode
String - filename - name of file to write PNG image
 o PNGEncoder
 public PNGEncoder(Image img,
                   OutputStream out)
Constructs PNG encoder

Parameters:
Image - image - Image to encode
OutputStrem - out - output stream to write PNG image
 o PNGEncoder
 public PNGEncoder(ImageProducer ip,
                   OutputStream out)
Constructs PNG encoder

Parameters:
ImageProducer - ip - image producer of the image to encode
OutputStrem - out - output stream to write PNG image

Methods

 o setImage
 public void setImage(ImageProducer ip)
Sets image producer of the image to encode

Parameters:
ImageProducer - ip - image producer of the image to encode
 o setImage
 public void setImage(Image img)
Sets image to encode

Parameters:
ImageProducer - ip - image producer of the image to encode
 o setOutput
 public void setOutput(OutputStream out)
Sets output stream for encoded image

Parameters:
OutputStream - out - output stream for encoded image
 o encode
 public void encode() throws PNGException, IOException
Strats encoding

 o setDimensions
 public void setDimensions(int width,
                           int height)
Sets width and height of this image Implements java.awt.image.ImageConsumer.setDimensions() method

 o setProperties
 public void setProperties(Hashtable props)
Sets the extensible list of properties associated with this image Implements java.awt.image.ImageConsumer.setProperties() method

 o setColorModel
 public void setColorModel(ColorModel model)
Sets the color model for this image Implements java.awt.image.ImageConsumer.setColorModel() method

 o setHints
 public void setHints(int hintflags)
Sets the hints for this image Implements java.awt.image.ImageConsumer.setHints() method

 o setPixels
 public void setPixels(int x,
                       int y,
                       int w,
                       int h,
                       ColorModel model,
                       byte pixels[],
                       int off,
                       int scansize)
Sets the pixels of this image. The pixels are all stored as bytes. Implements java.awt.image.ImageConsumer.setPixels() method

 o setPixels
 public void setPixels(int x,
                       int y,
                       int w,
                       int h,
                       ColorModel model,
                       int pixels[],
                       int off,
                       int scansize)
Sets the pixels of this image. The pixels are all stored as ints. Implements java.awt.image.ImageConsumer.setPixels() method

 o imageComplete
 public void imageComplete(int status)
Sets the image status. Implements java.awt.image.ImageConsumer.imageComplete() method

 o encodeDone
 protected synchronized void encodeDone()
Stops encoding proccess. For internal usage.


All Packages  Class Hierarchy  This Package  Previous  Next  Index