Package com.kheops.util.encoders
Class PngEncoder
java.lang.Object
com.kheops.util.encoders.PngEncoder
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
-
Constructor Summary
ConstructorDescriptionCreates 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 Summary
Modifier and TypeMethodDescriptionvoid
encode
(Image image, OutputStream os) Encodes the specified image to the specified output stream.
-
Field Details
-
DEFAULT_COMPRESSION
public static final int DEFAULT_COMPRESSION- See Also:
-
BEST_COMPRESSION
public static final int BEST_COMPRESSION- See Also:
-
BEST_SPEED
public static final int BEST_SPEED- See Also:
-
COLOR_TRUECOLOR_ALPHA
public static final int COLOR_TRUECOLOR_ALPHA- See Also:
-
COLOR_TRUECOLOR
public static final int COLOR_TRUECOLOR- See Also:
-
COLOR_INDEXED
public static final int COLOR_INDEXED- See Also:
-
-
Constructor Details
-
PngEncoder
public PngEncoder()Creates a new PNG encoder using the default compression and the true color type. -
PngEncoder
public 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
-
encode
Encodes 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
-