xmlgraphics-commons 1.4

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 734420 2009-01-14 15:38:32Z maxberger $

Constructor Summary
PNGImageWriter()
           
 
Method Summary
 java.lang.String getMIMEType()
           
 void writeImage(java.awt.image.RenderedImage image, java.io.OutputStream out)
          Encodes an image and writes it to an OutputStream.
 void writeImage(java.awt.image.RenderedImage image, java.io.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(java.awt.image.RenderedImage image,
                       java.io.OutputStream out)
                throws java.io.IOException
Description copied from interface: ImageWriter
Encodes an image and writes it to an OutputStream.

Parameters:
image - the image to be encoded
out - the OutputStream to write to
Throws:
java.io.IOException - In case of an /IO problem
See Also:
ImageWriter.writeImage(java.awt.image.RenderedImage, java.io.OutputStream)

writeImage

public void writeImage(java.awt.image.RenderedImage image,
                       java.io.OutputStream out,
                       ImageWriterParams params)
                throws java.io.IOException
Description copied from interface: ImageWriter
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:
java.io.IOException - In case of an /IO problem
See Also:
ImageWriter.writeImage(java.awt.image.RenderedImage, java.io.OutputStream, ImageWriterParams)

getMIMEType

public java.lang.String getMIMEType()
Returns:
the target MIME type supported by this ImageWriter
See Also:
ImageWriter.getMIMEType()

xmlgraphics-commons 1.4

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