JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.util.swing.encode
Class PNGEncoder

java.lang.Object
  |
  +--com.klg.jclass.util.swing.encode.AbstractImageEncoder
        |
        +--com.klg.jclass.util.swing.encode.PNGEncoder
All Implemented Interfaces:
Encoder

public class PNGEncoder
extends AbstractImageEncoder

This class encodes a Png file from an Image to an OutputStream. Color depths 8, 16, 24 and 32 are supported. No additional Png blocks except those absolutely necessary for Png encoding are included.


Constructor Summary
PNGEncoder()
           
 
Method Summary
 int compress(byte[] outarray, byte[] pixelarray, int width, int height)
           
 int compress(byte[] outarray, int[] pixelarray, ColorModel cmodel, int width, int height)
           
 void saveImage(Image img, OutputStream ofile)
           
 
Methods inherited from class com.klg.jclass.util.swing.encode.AbstractImageEncoder
byteFromChar, byteFromInt, bytesFromInt, bytesFromLong, compressColor, compressColor, createByte, encode, encode, error, snapshot, snapshotJava3d
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PNGEncoder

public PNGEncoder()
Method Detail

saveImage

public void saveImage(Image img,
                      OutputStream ofile)
               throws IOException,
                      EncoderException
Specified by:
saveImage in class AbstractImageEncoder
IOException
EncoderException

compress

public int compress(byte[] outarray,
                    int[] pixelarray,
                    ColorModel cmodel,
                    int width,
                    int height)
             throws EncoderException
EncoderException

compress

public int compress(byte[] outarray,
                    byte[] pixelarray,
                    int width,
                    int height)
             throws EncoderException
EncoderException

Copyright © 2004 Quest Software Inc..
All rights reserved.