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: PNGImageWriter.java 1732018 2016-02-24 04:51:06Z gadams $
-
-
Constructor Summary
Constructors Constructor Description PNGImageWriter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetMIMEType()voidwriteImage(java.awt.image.RenderedImage image, java.io.OutputStream out)Encodes an image and writes it to an OutputStream.voidwriteImage(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
-
-
-
-
Method Detail
-
writeImage
public void writeImage(java.awt.image.RenderedImage image, java.io.OutputStream out) throws java.io.IOExceptionEncodes an image and writes it to an OutputStream.- Parameters:
image- the image to be encodedout- the OutputStream to write to- Throws:
java.io.IOException- In case of an /IO problem
-
writeImage
public void writeImage(java.awt.image.RenderedImage image, java.io.OutputStream out, ImageWriterParams params) throws java.io.IOExceptionEncodes an image and writes it to an OutputStream.- Parameters:
image- the image to be encodedout- the OutputStream to write toparams- a parameters object to customize the encoding.- Throws:
java.io.IOException- In case of an /IO problem
-
getMIMEType
public java.lang.String getMIMEType()
- Returns:
- the target MIME type supported by this ImageWriter
-
-