Class PNGImageWriter

java.lang.Object
org.apache.xmlgraphics.image.writer.AbstractImageWriter
org.apache.xmlgraphics.image.writer.internal.PNGImageWriter
All Implemented Interfaces:
ImageWriter

public class PNGImageWriter extends AbstractImageWriter
ImageWriter implementation that uses the internal PNG codec to write PNG files.
Version:
$Id$
  • Constructor Details

    • PNGImageWriter

      public PNGImageWriter()
  • Method Details

    • writeImage

      public void writeImage(RenderedImage image, OutputStream out) throws IOException
      Encodes an image and writes it to an OutputStream.
      Parameters:
      image - the image to be encoded
      out - the OutputStream to write to
      Throws:
      IOException - In case of an /IO problem
    • writeImage

      public void writeImage(RenderedImage image, OutputStream out, ImageWriterParams params) throws IOException
      Encodes an image and writes it to an OutputStream.
      Parameters:
      image - the image to be encoded
      out - the OutputStream to write to
      params - a parameters object to customize the encoding.
      Throws:
      IOException - In case of an /IO problem
    • getMIMEType

      public String getMIMEType()
      Returns:
      the target MIME type supported by this ImageWriter