xmlgraphics-commons 2.1

org.apache.xmlgraphics.image.writer.internal
Class PNGImageWriter

java.lang.Object
  extended by org.apache.xmlgraphics.image.writer.AbstractImageWriter
      extended by 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: PNGImageWriter.java 1400596 2012-10-21 08:49:02Z gadams $

Constructor Summary
PNGImageWriter()
           
 
Method Summary
 String getMIMEType()
          
 void writeImage(RenderedImage image, OutputStream out)
          Encodes an image and writes it to an OutputStream.
 void writeImage(RenderedImage image, OutputStream out, ImageWriterParams params)
          Encodes an image and writes it to an OutputStream.
 
Methods inherited from class org.apache.xmlgraphics.image.writer.AbstractImageWriter
createMultiImageWriter, isFunctional, supportsMultiImageWriter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PNGImageWriter

public PNGImageWriter()
Method Detail

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

xmlgraphics-commons 2.1

Copyright 1999-2016 The Apache Software Foundation. All Rights Reserved.