Class PNGImageWriter
java.lang.Object
org.apache.xmlgraphics.image.writer.AbstractImageWriter
org.apache.xmlgraphics.image.writer.internal.PNGImageWriter
- All Implemented Interfaces:
ImageWriter
ImageWriter implementation that uses the internal PNG codec to
write PNG files.
- Version:
- $Id$
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
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
-
Constructor Details
-
PNGImageWriter
public PNGImageWriter()
-
-
Method Details
-
writeImage
Encodes an image and writes it to an OutputStream.- Parameters:
image
- the image to be encodedout
- 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 encodedout
- the OutputStream to write toparams
- a parameters object to customize the encoding.- Throws:
IOException
- In case of an /IO problem
-
getMIMEType
- Returns:
- the target MIME type supported by this ImageWriter
-