Package org.apache.commons.imaging.formats.png

# Class PngWriter

java.lang.Object
org.apache.commons.imaging.formats.png.PngWriter

public class PngWriter extends Object

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PngWriter()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `writeImage(BufferedImage src, OutputStream os, PngImagingParameters params, PaletteFactory paletteFactory)`
  Writes an image to an output stream.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### PngWriter

    public PngWriter()

- ## Method Details

  - ### writeImage

    public void writeImage(BufferedImage src, OutputStream os, PngImagingParameters params, PaletteFactory paletteFactory) throws ImagingException, IOException
    Writes an image to an output stream.
    Parameters:
      `src` - The image to write.
      `os` - The output stream to write to.
      `params` - The parameters to use (can be `NULL` to use the default `PngImagingParameters`).
      `paletteFactory` - The palette factory to use (can be `NULL` to use the default `PaletteFactory`).
    Throws:
      `ImagingException` - When errors are detected.
      `IOException` - When IO problems occur.