Package com.kheops.util.encoders
Class PngEncoder
java.lang.Object
com.kheops.util.encoders.PngEncoder
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final int
- 
Constructor SummaryConstructorsConstructorDescriptionCreates a new PNG encoder using the default compression and the true color type.PngEncoder(int colorType, int compression) Creates a new PNG encoder using the specified compression and color type.
- 
Method SummaryModifier and TypeMethodDescriptionvoidencode(Image image, OutputStream os) Encodes the specified image to the specified output stream.
- 
Field Details- 
DEFAULT_COMPRESSIONpublic static final int DEFAULT_COMPRESSION- See Also:
 
- 
BEST_COMPRESSIONpublic static final int BEST_COMPRESSION- See Also:
 
- 
BEST_SPEEDpublic static final int BEST_SPEED- See Also:
 
- 
COLOR_TRUECOLOR_ALPHApublic static final int COLOR_TRUECOLOR_ALPHA- See Also:
 
- 
COLOR_TRUECOLORpublic static final int COLOR_TRUECOLOR- See Also:
 
- 
COLOR_INDEXEDpublic static final int COLOR_INDEXED- See Also:
 
 
- 
- 
Constructor Details- 
PngEncoderpublic PngEncoder()Creates a new PNG encoder using the default compression and the true color type.
- 
PngEncoderpublic PngEncoder(int colorType, int compression) Creates a new PNG encoder using the specified compression and color type.- Parameters:
- colorType- the color type to encode with.
- compression- the compression level.
 
 
- 
- 
Method Details- 
encodeEncodes the specified image to the specified output stream.- Parameters:
- image- the image to encode.
- os- the output stream which will receive the encoded image.
- Throws:
- IOException
 
 
-