Class PngEncoder

java.lang.Object
com.kheops.util.encoders.PngEncoder

public class PngEncoder extends Object
  • Field Details

  • 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

      public void encode(Image image, OutputStream os) throws IOException
      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